How Mob Spawning Actually Works
Light levels, the mob cap, the 24-block rule and despawning — the four mechanics that decide whether your farm produces anything.
Almost every "my farm doesn't work" problem comes back to one of four spawning rules. Learn them once and you can debug any farm yourself instead of rebuilding it from a different video.
Rule 1: hostile mobs need block light 0
This changed and a lot of older tutorials never caught up. In current Java Edition, hostile mobs need a block light level of exactly 0 to spawn. Not 7 or below — zero.
That makes mob-proofing far easier than it used to be. A single torch shuts down a large area, because any light at all is enough.
Two kinds of light exist and they behave differently:
- Block light comes from torches, lanterns, glowstone, campfires and lava. This is the one that blocks hostile spawns.
- Sky light comes from the sky and drops to 0 at night. It does not stop spawns after dark, which is why your unlit garden fills with zombies but your torch-lit cave does not.
Rule 2: the 24-block ring
Mobs will not spawn within 24 blocks of you, and they stop spawning past 128 blocks. Your farm's spawning platform has to sit inside that ring.
This is the single most common build mistake. People stand right on top of the spawner platform and wonder why nothing appears. Move your AFK spot at least 24 blocks away — usually straight up or straight down — and the same farm suddenly works.
Distance is measured in a sphere from the player, so "24 blocks up" counts exactly as much as "24 blocks sideways".
Rule 3: the mob cap
The game will only keep a limited number of hostile mobs loaded around you at once. Once that cap is reached, nothing else spawns anywhere — including in your farm.
That is why cave systems near a farm are so damaging. Every zombie standing in an unlit cavern within range is occupying a slot your farm wanted. Two fixes:
- Build in the sky or over an ocean. Nothing else in range can spawn, so the entire cap belongs to your farm. This is why mob grinders are usually floating platforms.
- Light up or slab over nearby caves. Effective but slow, and one missed ledge undoes a lot of work.
Spawner-based farms like the spawner XP farm care less about this, because spawners have their own rules and ignore the general cap.
Rule 4: what counts as a valid spawn space
A mob needs somewhere legal to appear:
- A solid, opaque block to stand on. Glass, leaves, slabs in the top position and bottom slabs all block spawning for most mobs.
- Enough headroom — two blocks for a zombie or skeleton, more for an enderman.
- No solid block in the space the mob would occupy.
This is why slabbing a floor is such a reliable mob-proofing trick, and why farms use specific block types on their spawning platforms.
Despawning
Mobs vanish under two conditions. Past 128 blocks they despawn instantly. Between 32 and 128 blocks they have a random chance to despawn each tick, which is why mobs sometimes evaporate on the way to your kill chamber.
Mobs that have picked up an item, been named with a name tag, or been bred by you will not despawn at all. That matters for villager and animal farms, and it is why a wandering zombie holding a dropped sword sticks around forever.
Debugging a farm that produces nothing
Work down this list in order:
- 1.Are you at least 24 blocks from the spawn platform?
- 2.Is the platform genuinely at light level 0? Press F3 and check the light reading while standing on it.
- 3.Are there unlit caves within 128 blocks eating the cap?
- 4.Is the spawn surface a full solid block with two blocks of air above it?
- 5.Are the mobs actually dying and dropping into your collection system, or getting stuck?
Nine times out of ten it is number one or number three.