mojira.dev
MC-132608

Slimes and magma cubes split in method marking entity for removal (setDead)

The bug

Slimes and magma cubes split when the method net.minecraft.entity.monster.EntitySlime.setDead() (MCP name) is called. This is problematic since this method is used when an entity is marked for removal and therefore not only when the entity dies.

This can cause slimes to split multiple times.

If the splitted slimes / magma cubes are still supposed to spawn when the XP is spawned, the method net.minecraft.entity.EntityLivingBase.onDeathUpdate() could be overridden or a proper method could be added which is called by onDeathUpdate() when the 20 ticks are reached.

Fix implications

Fixing this might break the behavior described in MC-51732. It is however questionable how useful this behavior was, since it was likely rather annoying when trying to get rid of slimes.

How to reproduce

  1. Set the difficulty to "Peaceful"

  2. Switch to third person view (press F5)

  3. /summon slime ~ ~ ~ {Health:0f,DeathTime:-40s,Size:5}

    ❌ For a short moment you see that the slime split before it and the smaller slimes despawn

Related issues

Comments

galaxy_2alex

As far as I can tell, this no longer occurs in 20w21a, the slime only splits once. Could someone else test this to confirm?

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki

Avoma

Can confirm that this no longer occurs in 20w51a.

marcono1234

Can still reproduce in 20w51a, clarified the reproduction steps a little bit.

[Mod] Jingy

Can confirm in 24w09a. May relate to MC-106291 MC-124871 MC-183240

marcono1234

(Unassigned)

Confirmed

(Unassigned)

magma_cube, slime

Minecraft 1.12.2, Minecraft 1.13-pre5, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, 20w21a, 20w51a, 24w09a

Retrieved