CIT Resewn

CIT Resewn

14M Downloads

Make the "Hand" Predicate Useful

Closed this issue ยท 1 comments

commented

There are 2 big issues with CIT's "Hand" predicate that greatly diminishes its use case. As you know, in the CIT properties, you can specify hand=any, main, or off.

  1. Firstly, the "main" value is absolutely useless. According to Optifine's CIT docs, and what I've observed to be true in practice, is that the inventory is also treated as the main hand. It does not matter whether the item is in your main hand or your inventory, CIT will treat it the same. Just why? Why does this predicate even exist then? I can't think of a single reason to use it with the way that it is now because there is no distinction when you move the item into your hand.

  2. The offhand predicate does work better but still a little ways out from being truly useful. The offhand predicate is not tied to the inventory so when you move the item to the offhand, it will get updated. This is great and how it should work for the mainhand. HOWEVER, when the model of the held item is updated, it also updates in the inventory. It would be great if the capabilities were pushed further in order to allow for unique models when the item is held vs when it is in the player's inventory.

Vanilla Minecraft actually already has this functionality with 2 items: the Spyglass and the Trident. Both the Spyglass and the Trident have 2D textures when in the inventory AND 3D models when in the players hand. Unfortunately, this relationship is hardcoded and can't be utilized by other items. It would be incredibly useful to resource pack authors to allow the use of different item models when held vs in the inventory.

So I propose 2 solutions:

  1. Decouple the main hand value from the inventory in-order to make main hand CIT textures/models actually viable.

  2. Separate these changes from the inventory entirely. I believe that when a hand is specified, CIT should then call a model/texture to be used exclusively in that hand.

Like I said, these changes would greatly open the door for resource pack developers and I hope that they are considered. Thank you for reading!

commented

If you could convince optifine to do that, it'd be a really really good way to resolve that matter. Sadly though I cannot use hand= like that as it would break parity if optifine doesnt do the same.

Semi related but I've had for a while this idea to have a condition for display where you could directly check the current display profile of the item like there is with models' transformations (with the values of thirdperson_righthand, thirdperson_lefthand, firstperson_righthand, firstperson_lefthand, gui, head, ground, or fixed)
I think it'd be much more useful in the long run than using hand.

That one is much more likely to be added than modifying the behavior of the hand condition. Closing the issue for now though.