Magma Cube

A magma cube is a hostile mob found in the Nether. A magma cube behaves similarly to a slime, but they jump higher, are tougher, deal a higher amount of damage with its attacks.

Spawning
Magma cubes spawn 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 inherently fireproof, magma cubes can spawn on magma blocks.

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



A magma cube needs roughly a 3×2.1x3 free space to spawn. The area in which they spawn 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. These conditions are in effect since the Nether Update.

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 nether 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. 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.
 * Large magma cube: 0–1 (0.25 average) and  experience
 * Medium magma cube: 0–1 (0.25 average) and  experience
 * Small magma cube: experience (or 1  if killed by a frog).

Behavior
A magma cube seeks out any player or an iron golem within a spherical distance of 16 blocks. If it finds no enemy, it changes direction every 40 to 100 ticks (2 to 5 seconds) and jumps forward every 40 to 120 ticks (2 to 6 seconds). 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 continuously damage all players and iron golems they collide with (although damage immunity reduces the actual damage to 1 attack every half second), unlike other mobs that damage only those targets they specifically attack. 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.

Sounds


Magma cubes use the Friendly Creatures sound category for entity-dependent sound events.



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.
 * According the the article "visit the nether" magma cubes are not aggressive but their heat is dangerous when close.
 * 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.