mojira.dev
MC-183240

Mobs still count towards the mob cap during their death animation

The bug

While a mob is dying it still counts towards the mob cap.

To reproduce

  1. /gamerule doMobSpawning false

  2. Set difficulty to peaceful

  3. Set difficulty back to another difficulty

  4. Open F3 and observe the line starting with "SC"

  5. Summon a husk
    → The "M" value increases by 1, indicating that the mob cap for hostile mobs increased by 1

  6. Kill the husk
    → ❌ The "M" value doesn't decrease again until the death animation stops

Related issues

Attachments

Comments

migrated
[media][media][media][media]
violine1101

Confirmed. Probably affects older versions too, but I did not test that.

Finnegan O'Donnell

It does, Scicraft experienced it in 1.12.2, and maybe even 1.8, it is a very old bug.

Finnegan O'Donnell

A way to fix this bug would be by giving all mobs in their "death phase" the persistence required tag.

Marty McFly

Affects 1.17

PurPur5

Can confirm in 1.17.1 Pre-release 1.

PurPur5

Can confirm in 1.17.1 Pre-release 3.

PurPur5

Can confirm in 1.17.1 Release Candidate 2.

PurPur5

Can confirm in 1.17.1.

PurPur5

Can confirm in 21w38a.

PurPur5

Can confirm in 1.18 Pre-release 5.

MisteryGates

I don't think anyone would notice it if this got changed.

PurPur5

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.

PurPur5

Can confirm in 1.18.1.

[Mod] Jingy

Can confirm in 24w07a.
Relates to MC-106291 and MC-124871, which are both game behavior for mobs during their death animations (or rather, entities when they are marked dead, but not cleared yet)

Finnegan O'Donnell

(Unassigned)

Confirmed

Entities

mob-cap

1.15.2, 20w19a, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w38a, 1.18 Pre-release 5, 1.18.1, 24w09a, 1.20.6

Retrieved