The bug
When a mob equipped with randomly-generated armor or a weapon is killed and the item drops, it is given a random damage value. However, when a mob chooses to swap its spawn equipment for a better item on the ground, the original item is dropped fully repaired instead of getting randomly damaged.
How to reproduce
/gamerule mob_griefing true/summon husk ~ ~ ~ {equipment:{chest:{id:"leather_chestplate",count:1}},drop_chances:{chest:0.99f},CanPickUpLoot:1b,Health:0.1f}Kill the husk
-> ✔ It drops a damaged leather chestplateRun the command again
Drop a diamond chestplate at the husk
-> ❌ It drops an undamaged leather chestplate
Note that the damage to the item is not caused by damaging the mob. The random damage is applied on death and is not changed over the lifetime of the mob.
Suggestion
To fix, maybe random mob equipment can just be pre-damaged from the beginning? That way, you won't have to update the item every possible way it can drop, and also won't need a special case anymore for 2.0 drop chance to leave damage untouched.
Attachments
Comments 13
Ah, that makes sense. For a while I've thought that wasn't the case, and was confused at the seeming "exploit" of throwing a mob a better item just so you can kill it and get both 100%.
Glad to see my anxious suspicion that I never tested was false, hahaha.
That happens because the armor / hand drop chances are used in this case as well, which is very likely intended.