The bug
While a mob is dying it still counts towards the mob cap.
To reproduce
/gamerule doMobSpawning false
Set difficulty to peaceful
Set difficulty back to another difficulty
Open F3 and observe the line starting with "SC"
Summon a husk
→ The "M" value increases by 1, indicating that the mob cap for hostile mobs increased by 1Kill the husk
→ ❌ The "M" value doesn't decrease again until the death animation stops
Linked issues
relates to 2
Attachments
Comments 14
A way to fix this bug would be by giving all mobs in their "death phase" the persistence required tag.
Additional note: If the mob is holding an item and is killed, the corpse will appear as if it is still holding the item, but the item is dropped before the corpse disappears.
Confirmed. Probably affects older versions too, but I did not test that.