When using a composite model type in an item definition to composite two generated models together, the enchantment glint can z-fight in nonsensical places where it logically shouldn't be z-fighting (see attached screenshots). Creating the same setup but with a non-generated model doesnt cause this bug.
This happens when two generated models are placed next to each other using display settings so that the face of one model touches the face of the other. However, the z-fighting happens even in transparent areas of the face, this is the bug
Steps to reproduce
Download and enable the attached resourcepack "updated_enchantment_glint_zfighting_resourcepack.zip" in-game
Give yourself an iron sword using the following command
/give @s minecraft:iron_sword[minecraft:enchantment_glint_override=true]
Hold the sword in your right hand and notice the enchantment glint z-fighting on the front face of the sword
Give yourself a diamond sword using the following command
/give @s minecraft:diamond_sword[minecraft:enchantment_glint_override=true]
The diamond sword model has the same extra piece added, the only difference being that it is using an element instead of a generated model. Notice how the enchantment glint doesn't z-fight as expected
Expected Result
The enchantment glint shouldn't z-fight in this situation
Linked issues
Attachments
Comments 3
This seems to be exclusive to models generated from a texture. Using a cuboid placed in the exact same position doesn't cause the z-fighting to occur, I've attached an updated resourcepack that reproduces this
In that case it might even duplicate MC-166101.
Seems to relate to MC-166101; please verify this is exclusive to models generated from a texture.