Tiny Magma Slimes' Attack (bug?)
I've noticed that the smallest magma slimes still do damage (unlike normal slimes) -- however, you can stand in the midst of a bunch and not get hit for 5+ seconds. (this seems to be even more relevant if you stand still).
Is this a bug? How can I fix it, so that magma slimes hit the player normally (they hit you every time you touch them)?
Solution 1:
This is not a bug per say, it is more of an unusual circumstance that not many players find themselves in.
When doing a distance check between a player and a mob(from my own experience), it measures the distance from the players eye level to the mob's "feet".
This is why it is much harder to attack a large Slime while it is jumping over you, and why Ghasts can be easily be killed by shooting an arrow at their "legs", and also why Giant zombies can only be attacked at their legs, etc. etc.
Essentially, small Magma Cubes cannot hurt you because they cannot get close enough to do damage.
Solution 2:
The problem might be that you are too close, which means that the magma cube can't jump high enough to attack you because they have a angled attack jump. The Minecraft wiki article on Magma Cubes said that
The tiny cubes appear to only be able to damage you with their bottom side.
This could be the problem because there is not enough space between you and the cube. The cube would then rebound against you going a farther distance rather then being able to inflict damage on you.The 5+ second could also occur because magma cubes jump ever 40 to 120 ticks or 2 to 6 sec.But while chasing you the jump time is divided by 3.