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

Wolf armor loses custom display name and other NBT when equipped

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w05a
    • 24w03a
    • None
    • Confirmed
    • Inventory, Items
    • Normal
    • 1168752
    • Expansion A

      The bug

      When a wolf equips armor that has custom NBT data that data is lost. For example if you rename wolf armor using an anvil the item will lose its name when the armor is removed. This is inconsistent with other mobs like zombies that preserve the NBT of items they pickup and equip.

      How to reproduce

      1. Spawn a tamed wolf:
        /execute summon wolf run data modify entity @s Owner set from entity @p UUID
      2. Give yourself a renamed wolf armor item:
        /give @s wolf_armor{display:{Name:'"Test"'}}
      3. Equip the wolf armor on the wolf
      4. Use shears on the wolf
        The wolf armor is dropped
        The wolf armor has lost its custom name

            gnembon [Mojang] Gnembon
            darkhax Tyler Hancock
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: