Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-279822

Enchantment glint incorrectly z-fights in some situations with composite item models

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 25w04a
    • None
    • Unconfirmed
    • (Unassigned)

      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

      1. Download and enable the attached resourcepack "updated_enchantment_glint_zfighting_resourcepack.zip" in-game
      2. Give yourself an iron sword using the following command /give @s minecraft:iron_sword[minecraft:enchantment_glint_override=true]
      3. Hold the sword in your right hand and notice the enchantment glint z-fighting on the front face of the sword
      4. Give yourself a diamond sword using the following command /give @s minecraft:diamond_sword[minecraft:enchantment_glint_override=true]
      5. 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

        1. generated_model_incorrect_results.png
          625 kB
          ioblackshaw
        2. non_generated_model.png
          681 kB
          ioblackshaw

            Unassigned Unassigned
            Enchanted_Games ioblackshaw
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: