Mojira Archive
MC-259259

Hostile mobs can't replace armor they're wearing with better armor

The bug

When summoning a hostile mob creature that can pick up items, if they are equipped with armor, they cannot replace the armor already equipped. They can only replace any items in their hand. All mobs that can wear armor have this problem. The previous version (1.19.2) does not have this problem.

How to reproduce

  1. Summon a skeleton and use data command set "CanPickUpLoot" to 1b like:
    /data modify entity @e[type=minecraft:skeleton,distance=..10,limit=1] CanPickUpLoot set value 1b
  2. Give it basic armor, for example, leather material.
  3. Give it advanced armor like diamond.
  4. You can see it replaced its bow with advanced armor.
  5. If you give it a sword, it will keep picking up and replacing the items on its hand.

Expected behavior

If a mob that can pick up items picks up a type of armor that is better than what it is currently wearing, it should remove what it's wearing and put on the new better armor.

Observed behavior

If a mob that can pick up items picks up a type of armor that is better than what it is currently wearing, it will hold the better armor in its hand and continue to wear the inferior armor.

 

Fixed

xiaofan7520

[Mojang] eowyn36

2023-01-20, 05:23 AM

2023-03-08, 10:59 PM

2023-03-08, 10:58 AM

9

7

Confirmed

Important

Platform

Mob behaviour

1.19.3 - 1.19.4 Pre-release 21.19.3, 23w04a, 23w05a, 1.19.4 Pre-release 1, 1.19.4 Pre-release 2

1.19.4 Pre-release 4