The bug
Note how in the attached picture, the zombie, which is dying, has dropped its iron sword, however it still appears to be holding said sword.
Similar arguments could be given for blocks held by endermen, heads of mobs killed by charged creepers, sheep wool, skeletons' bones, and so on. However, these should likely have their own tickets.
An easy way to fix this is to make mobs only drop items after the corpse disappears, like experience used to, eliminating this discrepancy.
How to reproduce
Run:
/summon minecraft:zombie ~ ~ ~ {HandDropChances:[100f],HandItems:[{id:diamond_sword,Count:1b}],Health:1}
Hit the zombie.
→ ✔ Zombie dies and drops the sword as expected...
→ ❌ but the zombie still holds the sword while it's already dropped
Linked issues
is duplicated by 1
relates to 3
Attachments
Comments 11
Experience is now dropped at the time of death - perhaps loot drops could now be moved to the same time experience used to drop?
Resolving as 'Cannot Reproduce' for now. A fix version can be added afterwards in case someone finds out the exact version where this got fixed.
I can confirm that, at least for the provided zombie example, 1.16.3-rc1 was the version to fix this issue. It does not affect 1.16.3 nor any 1.16.4 prereleases, despite what the affects versions might say, implying either the fix was retroactive in some sense or that there was another similar example being tested (which should go in a dedicated ticket).
Not fixed for enderman. MC-221422
Relates to MCPE-30144