mojira.dev
MC-270930

Mobs will visually keep armor and weapons after removing them

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

Comments 1

tholleman

(Unassigned)

Community Consensus

Platform

Normal

Commands

1.20.5 Release Candidate 2

Retrieved