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

Items with empty enchantments NBT tag do not upgrade as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w14a
    • 24w11a
    • Confirmed
    • Commands, Datafixer
    • Important
    • Platform

      The bug

      Items with an empty NBT tag for enchantments (Enchantments:[]) do not upgrade to the new component system as expected. It'd be expected that they would get an enchantment_glint_override component tag, but this does not happen.

      Notably, items with the NBT tag (Enchantments:[{}]) do convert as expected, so it'd be expected that the other form would also do so.

      How to reproduce

      A world containing "phantom enchanted" items is attached to this ticket.

      1. Open the attached world in 1.10.2 (in 1.11 to 1.20.4, the items won't visually appear enchanted due to a bug, but the NBT tag is still there)
      2. Verify that the items look enchanted
      3. Open the attached world in the latest 1.20.5 snapshot
      4. Verify that not only do they not look enchanted, but that the empty enchantment tag is completely gone, and these items are now identical to normal unenchanted items

      Expected results

      These items would keep their enchantment glint in 1.20.5+ by converting to the new enchantment_glint_override component.

      Actual results

      They do not.

            gegy1000 [Mojang] Gegy
            Awesoman3000 Connor Steppie
            Votes:
            7 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: