Magma Cubes killed with a Knockback II Sword when targeting and attacking the player will sometimes teleport/slide back to the player if they enter a jumping animation upon death instead of dying in the spot where they were hit to.
This allows for Large and Medium Magma Cubes on death to generate smaller variants of themselves directly on the player instead of generating them where the Knockback II Sword hit them to, making the player take unnecessary damage when this should not happen.
Magma Cubes should not be able to perform a jump animation when their health is 0 or less, regardless of if they are in the air or on the ground and not despawned. This in itself is a bug, and allows this larger bug to occur.
This bug happens most frequently in close corridors like 2X2 block hallways and does not happen at all if a player is in Creative Mode and hence not targeted by the Magma Cubes.
Steps to Reproduce:
- Create a Sword and Enchant it with at least Knockback II
- Go into the Nether in Survival and find some Medium and Large Magma Cubes
- Lure them into small tunnels if they are Medium Sized (optional, but recommended)
- Kill the Magma Cubes
In some instances when killed, the Medium and Large Magma Cubes will enter a jump animation and teleport/slide back to the player before despawning despite being knocked away with Knockback II and generate smaller Magma Cubes onto/around the player
When killed with Knockback II Sword, the Large/medium Magma Cubes die in the spot they were knocked away to, generating smaller magma cubes at that spot.