Magma Cube

A magma cube is a hostile mob whose skin is dark red and black with red, orange, and yellow eyes. It is found in big, small and tiny sizes, exclusively in the Nether. They are considered the Nether equivalent of slimes, with similar behaviors.

Spawning
Magma cubes spawn in the Nether at all light levels in groups of 1-4, but their spawn rate is higher in fortresses.

Magma cubes require two vertical transparent blocks (e.g., air, signs, torches) to spawn in, with an opaque block underneath. The space they spawn in must also be clear of solid obstructions and liquids.

Big magma cubes require a 3×2½×3 space to spawn, small magma cubes require a 3×2×3 space, and tiny magma cubes require a 1×2×1 space (or 1×1×1 if the upper block is not opaque).

Drops
4 experiences for big magma cubes, 2 for small and 1 for tiny.

Big and small magma cubes have $1⁄4$ chance of dropping a single. The maximum amount of magma cream is increased by 1 per level of Looting. The chance of a magma cube not dropping any magma cream can be found using the formula. For example, Looting III gives a $3/7$ chance of not dropping any magma cream. All other amounts have an equal chance of occurring.

Behavior
A magma cubes moves by hopping at intervals of 40 to 120 ticks (2 to 6 seconds).

A magma cube seeks out any player or an iron golem within a 16 blocks (spherical) distance. If it finds no target, it waits 40 to 120 ticks (2 to 6 seconds), then changes direction by a random amount up to 57.30° (1 radian) left or right, jumps, and repeat the process. If it finds a target, the delay before jumping is $1⁄3$ as long (13 to 40 ticks) and the magma cube changes direction directly toward the target before jumping.

Like other Nether mobs, magma cubes cannot burn and are not slowed down or damaged by lava. Instead, it seems that they can swim upward extremely quickly in lava.

They cannot be hurt from fall damage.

They avoid water. Since Java Edition 1.13 they can swim, and don't drown in normal water (in previous versions they could not swim and would drown).

Their jump height depends on their size. Their forward speed is twice that of most other mobs. They always make a distinct sound upon jumping up and landing, but no idle sounds.

When a magma cube is killed, it may split into 2 to 4 magma cubes of the smaller size, and disappear like other mobs if the smallest size is killed. The new magma cubes are ejected at high speed..

Unlike most other mobs, magma cubes have no pathfinding ability, meaning that they do not avoid falling off cliffs and cannot go around walls, even when chasing a player.

"Few are as deadly as the Magma Cube locking sights on you. Get seen by this red and black horror and it bounces for you relentlessly, its springy body barely concealing a molten lava core that will fill your body with hot flamy pain. Friendly hugs are not advised."

- Tom Stone

Combat
Magma cubes attack players by attempting to land on top of them but can cause damage when the player touches them anywhere. This can make large magma cubes tricky to fight, as their jump rate is fairly random.

The health of a magma cube is size squared. The attack strength is size plus 2. The armor points is size tripled.

A magma cube can jump a distance approximate to its length times 1.5, and a height equivalent to its size in blocks. This means that a size 4 magma cube jumps four blocks in height and moves significantly quicker than a size 2 magma cube, which jumps two blocks in height, while a size 1 (tiny) cube moves at a slow rate and jumps one block in height.

Magma cubes also have an attack speed double that of other melee-combat mobs. Mobs like Endermen and silverfish attack at a rate of one hit per second, while magma cubes attack at a rate of two hits per second. This means that a size 4 magma cube can deal six hearts of damage per second on normal difficulty, dealing three hearts every half-second.

Data values
Magma cubes have entity data associated with them that contain various properties of the mob.

Trivia

 * When a larger magma cube that has a name dies, the smaller magma cubes it spawns also have the same name.
 * A dying magma cube can still damage the player.