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 totrue
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
Linked issues
is duplicated by 6
Attachments
Comments 12
Zombified Piglins that have CanPickUpLoot enable, can pick swords that are worse than their current ones, making them take swords infinitely.
That means that the 5 minutes counter to despawn can reset because they are on the ground for less than 2 seconds, u can crash a world or a server in a few hours.
More zombified Piglings dying, more swords on the ground, more noticeable this bug is.
Easy way to replicate this bug is with any gold farm that dont pick up swords.
Watch this part: [https://youtu.be/nMBYnGD8PbQ?t=514
If you dont have a system to take care of the swords, they are gonna be thousands, more zombified piglins dying in a single spot, more swords in that spot and everytime that a zombified piglin enter that spot is gonna take all at one, thats gonna happen over and over again.
Might be the same as MC-113131. Do you know if the unenchanted swords are damaged?
You are right Marcono1234, only happens when Item A has no damage/enchants and item B has enchants and damage.
This does not happen in 1.15.2, only in 1.16+
Also affects 1.19.40 I found a zombie after a desert temple trap exploded with extreme Decision Paralysis. See video.
Zombie unable to chose which block to hold
Does this still occur in the latest version? I can't seem to reproduce it using the reproduction steps.
Please provide more details. Why exactly is this a bug, and how do you replicate it reliably? Simply linking to youtube videos is not enough.