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.
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.
MC-116647, however there are likely other ways to reproduce this as well.
→ Splitted slimes spawn
- Go to the end
→ After about 3 seconds splitted slimes spawn, as expected