Dye tints in custom models are invisible in certain contexts
Custom item models that use dye tinting will fail to render their tinted faces in certain conditions. Based on my testing, it happens when:
- The item has no "dyed_color" component.
- The item is not a placeable block.
- The "default" color set in the item definition is a positive number.
The attached resource pack contains a simple item model that displays this. It consists of an upper cube that's tinted and a lower cube that isn't.
How to reproduce:
- Install the provided resource pack
- Run
/give @s white_wool[item_model="test:test"]This renders correctly.
- Run
/give @s stick[item_model="test:test"]This does NOT render correctly (only the bottom cube is visible)
- Run
/give @s stick[item_model="test:test",minecraft:dyed_color=4208181]This renders correctly, even though the defined color is exactly the same as the default on the item definition.
Lastly: If you open up the resource pack and go to "assets/test/items/test.json" and change the default color to be any negative number, everything renders as it should with no issues.
Code analysis
The net.minecraft.client.color.item.Firework#calculate and net.minecraft.client.color.item.Dye#calculate use this.defaultColor without wrapping it in ARGB.opqaque.