Magma Cube

A magma cube is a hostile mob found in the Nether. A magma cube behaves similarly to a slime, but with more damaging attacks.

Spawning
They are found in areas of the Nether at all light levels. The space they spawn in must be clear of solid obstructions and liquids. Due to being inherintly fireproof, magma cubes can spawn on magma blocks.

Only sizes 1, 2, and 4 (NBT  tag values 0, 1 and 3 respectively) spawn naturally. With use of, magma cubes can potentially range from size 1 to 256 (NBT  tag 0–255).



A magma cube needs roughly a 3×2.1x3 free space to spawn. The area in which the magma cube spawns in must be clear of solid or liquid obstructions. When a magma cube attempts to spawn, the game checks for the space requirement of a large magma cube, and the size is determined later. Therefore, since large magma cubes are slightly taller than 2 blocks, no magma cubes, regardless of size, are able to spawn at all in 2-block-high areas. Also, since large magma cubes are slightly wider than 2 blocks, and mobs spawn at the center of a block, having any block within the 3×2.1x3 area, even as thin as a glass pane, can prevent a magma cube of any size from spawning.

Magma cubes' size is affected by regional difficulty: chances range from 33% for each size at the low difficulty to 16% small, 33% medium, and 50% big with higher difficulty.

Nether Wastes
Magma cubes spawn uncommonly in nether wastes in groups of 1 to 4.

Nether Fortresses
Magma cubes spawn commonly in fortresses in groups of 4.

Basalt Deltas
Magma cubes spawn commonly in basalt deltas, in groups of 2 to 5.

Spawners
Magma cube spawners generate in the treasure room of bastions.

Drops
The maximum of can be increased by 1 per level of Looting. Looting 1 averages 0.5 per kill, Looting 2 averages ~0.81 per kill, and Looting 3 averages ~1.21 per kill.
 * Large magma cube: 0–1 and  experience
 * Small magma cube: 0–1  (0.25 average) and  experience
 * Tiny magma cube: experience

Unlike a lot of common loot which picks a random number between 0 and 1 for its drop, the Magma Cube's drop ranges between -2 and 1 instead. This leads to the 25% drop chance from an unenchanted kill, as well as the relatively low averages with the Looting enchantment since a negative base roll can cancel out the bonus roll made by Looting.

Behavior
A magma cube 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 enemy, it waits for 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 $$ as long (13 to 40 ticks) and the magma cube changes direction directly toward the target before jumping.

Magma cubes cannot be hurt by fall damage or burning, and are not slowed down by lava. They can swim upward in lava and leap above its surface.

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 splits into 2-4 smaller magma cubes. Tiny magma cubes disappear when killed, like other mobs.

They can swim in water and attempt to stay on the surface. Like slimes, magma cubes drown if submerged in water for 15 seconds, splitting into smaller cubes if possible.

Unlike most 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.

When they are in lava, they hover and try to move to nearby land.

Combat
Magma cubes attack by jumping and attempting to land on the player, and cause damage when touched anywhere. As their jump rate is random, magma cubes can be hard to fight.

The health of a magma cube is its size squared; the attack strength is its size + 2, and the armor points are its size tripled.

A magma cube jumps a distance of approximately its length times 1.5 and a height equivalent to its size in blocks. This means that a large magma cube jumps 4 blocks in height and moves significantly quicker than a small magma cube, which jumps 2 blocks in height; while a tiny magma cube moves slowly and jumps 1 block in height.

Magma cubes have an attack speed twice as fast as most mobs. Mobs like zombies attack once per second, while magma cubes attack twice per second. This means that a large magma cube deals of damage per second on normal difficulty. Unlike slimes, tiny magma cubes can deal damage to the player.

ID




Entity data
Magma cubes have entity data associated with them that contains various properties.




 * See Bedrock Edition level format/Entity format.
 * See Bedrock Edition level format/Entity format.

Trivia

 * When a larger magma cube that has a name dies, the smaller magma cubes it spawns also have the same name, just like slimes.
 * Magma cube is the only mob native to the Nether that can truly swim in water.
 * Zombified piglins, skeletons and wither skeletons sink in water.
 * Piglins, piglin brutes and hoglins sink in water and drown.
 * Endermen, blazes, and striders take damage in water immediately.
 * Ghasts ignore water while floating around.