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

Mobs will visually keep armor and weapons after removing them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.5 Release Candidate 2
    • None
    • Community Consensus
    • Commands
    • Normal
    • Platform

      When a mob spawns with an item that is then immediately removed, the item will still be shown visually.

      Steps to reproduce

      1. Freeze the tick rate
        /tick freeze
      2. Give yourself a zombie spawn egg with armor (this is just for testing, it also works with natural spawns)
        /give @p zombie_spawn_egg[entity_data={id:"minecraft:zombie", HandItems:[{id:"minecraft:golden_sword",count:1},{}], ArmorItems:[{},{},{},{id:"minecraft:golden_helmet",count:1}]}] 1
      3. Spawn the zombie
      4. Remove the items
        /data merge entity @e[type=minecraft:zombie, sort=nearest, limit=1] {ArmorItems:[{},{},{},{}],HandItems:[{},{}]}
      5. Unfreeze the tick rate
        /tick unfreeze
      6. The zombie will burn in the sunlight and according to /data is not holding any items
        /data get entity @e[type=minecraft:zombie, sort=nearest, limit=1] ArmorItems
        /data get entity @e[type=minecraft:zombie, sort=nearest, limit=1] HandItems

            Unassigned Unassigned
            tholleman tholleman
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: