Mob item pick up behavior is not distinct resulting in mobs constantly dropping and picking up items
The bug
Mobs with CanPickUpLoot:1b do not have distinct rules for when to pick up items. Instead they constantly switch an undamaged item with a damaged item of the same type with additional NBT (e.g. enchantments, custom name, ...).
This is a clone of MC-113131, however it appears there were some versions including 1.15.2 where mobs did not prefer items with NBT. This might have been fixed by MC-174359.
The code analysis of MC-113131 is likely still relevant.
Results on a survival: https://www.reddit.com/r/Minecraft/comments/iao4p3/i_just_finished_afking_at_my_new_gold_farm_when_i/
Example videos:
How to reproduce
- Summon a mob which can pick up items
/summon husk ~ ~ ~ {CanPickUpLoot:1b} - Set the mobGriefing gamerule to true if it is not already
/gamerule mobGriefing true - Throw an undamaged chestplate at the mob
/give @p diamond_chestplate
- Throw a damaged chestplate (with NBT) at the mob
/give @p diamond_chestplate{Enchantments:[{id:unbreaking,lvl:1s}],Damage:1}→
The mob constantly swaps the items
2020-07-02, 08:43 PM
2024-11-10, 05:58 AM
2024-11-10, 05:58 AM
20
8