1 - Distance to the spawn platform
2 - Block light on the platform
Since 1.18 hostile mobs need block light level 0. Older versions allowed light 7 or lower.
3 - Platform height (optional)
Distance is measured in a straight line. Sitting straight up above the floor at this height makes the height your distance, which is the simplest farm layout.
4 - Loaded spawnable chunks
The hostile cap is floor(70 x chunks / 289). With one player at default this is about 70 mobs.
Verdict
Can spawn here
Block light is 0, and the surface sits 128 blocks away, inside the 24 to 128 spawn band, so hostile mobs will attempt to spawn.
Random despawn chance
Between 32 and 128 blocks a mob has a per-tick random chance to despawn. This is the normal, intended zone for a farm: mobs spawn and are funneled to the kill spot before the chance fires.
Good AFK placement
128 blocks keeps the spawn platform comfortably inside the 24 to 128 band, so mobs spawn freely, then drift into the despawn zone where the farm funnels them to the kill spot. This is the placement you want.
Light level OK
Block light is 0, so hostile mobs can spawn on this surface. Since 1.18 the requirement is block light exactly 0 (it was 7 or lower before then), so light-proof the platform fully or no mobs appear.
Distance zones
The numbers
Assumptions
Distances are straight-line from the nearest player. Hostile mobs attempt to spawn within 128 blocks but never within 24. A mob over 128 blocks away despawns instantly, one between 32 and 128 has a per-tick chance to despawn, and one within 32 never despawns from distance. Since 1.18 hostile spawns require block light level 0. The hostile cap is floor(70 x eligible chunks / 289), roughly 70 for a single player. Numbers from the Minecraft Wiki for current Java Edition; other dimensions and modes differ.
Hostile mobs spawn on a block when the block light is 0 and the surface sits more than 24 blocks but no more than 128 blocks from the nearest player, and only while the hostile mob cap of about 70 is not already full. Miss any one of those and the platform stays empty.
The light rule is the one that trips most people up. Since 1.18 hostile mobs require block light level 0 on the surface they spawn on. Before 1.18 the threshold was block light 7 or lower, which is why old tutorials say to keep it "below 8". On a modern world a single torch, lava glow, or any sky light reaching the platform raises the level above 0 and stops every spawn, so a working farm fully encloses and darkens the spawn floor.
Distance is the second gate. Mobs attempt to spawn within a 128-block sphere of the player but never inside 24 blocks, so the spawnable band is 24 to 128. The calculator above checks light and distance together and tells you exactly which gate is failing.
Once a mob exists, three nested spheres around the player decide what happens to it. A mob more than 128 blocks away despawns instantly. Between 32 and 128 blocks it has a per-tick random chance to despawn. Within 32 blocks it never despawns because of distance. The 24-block no-spawn radius sits inside all of that, so the only band where mobs both spawn and stick around long enough to be farmed is 24 to 128 blocks.
| Distance from player | Can spawn? | Despawn behavior | What it means for a farm |
|---|---|---|---|
| 0 to 24 blocks | No | Never despawns | Inside the no-spawn bubble; mobs already here just sit. |
| 24 to 32 blocks | Yes | Never despawns | Spawns work but you are too close for a hands-off farm. |
| 32 to 128 blocks | Yes | Random chance | The intended farm zone: spawn, then funnel to the kill spot. |
| Over 128 blocks | No | Instant despawn | Out of range; nothing spawns and existing mobs vanish. |
Naming a mob with a name tag, or letting it pick up dropped gear, makes it persistent and exempt from distance despawning. That is the opposite of what a farm wants: farms rely on the random despawn chance staying low because the mob is killed quickly, not on making mobs permanent.
A good general-purpose layout puts the player about 128 blocks straight up from the spawn floor. That keeps the spawning surface inside the 128-block sphere while you are far enough away to avoid suppressing spawns, and it lifts you above most caves so they do not load and steal the cap. The platform must stay beyond 24 blocks or nothing spawns; anywhere from roughly 28 to 128 blocks works, with higher being better for isolating the farm.
The hostile mob cap limits how many hostile mobs can exist around you at once. It scales with loaded spawnable chunks as floor(70 x chunks / 289), where 289 is the 17 by 17 chunk area around one player at normal render distance, so a single player sees a cap of about 70. Every lit-up cave and unlit dark spot near you competes for that same cap, which is why a productive farm also lights or removes nearby spawning surfaces.
Put it together with the verdict panel above: 1. light the floor down to 0, 2. place yourself beyond 24 and within 128 blocks, ideally around 128 up, and 3. clear competing spawns nearby so your platform owns the cap.
The three usual causes are light, distance and the mob cap. Since 1.18 hostile mobs only spawn at block light level 0, so any light source or sky light on the platform stops spawns. The platform must also be more than 24 blocks but no more than 128 blocks from you. Finally, if other caves or dark spots nearby are full of mobs they eat the cap of about 70, so light up the surrounding area or build at a height where nothing else is loaded.
A hostile mob more than 128 blocks from the nearest player despawns instantly. Between 32 and 128 blocks it has a small per-tick random chance to despawn. Within 32 blocks it never despawns because of distance. Mobs cannot spawn within 24 blocks of you at all, so the spawnable band is 24 to 128 blocks.
A common choice is about 128 blocks above the spawn floor, straight up. That keeps the spawn area inside the 128-block spawn sphere while putting you far enough away that you are not suppressing spawns, and it pushes other nearby caves out of range so they do not steal the mob cap. Anything from roughly 28 to 128 blocks works; closer than 24 stops spawns entirely and farther than 128 puts the platform out of range.
Since Minecraft 1.18 hostile mobs require block light level exactly 0 to spawn. Before 1.18 the threshold was block light 7 or lower. Sky light no longer matters for the spawn check the way it used to, so a fully enclosed, unlit platform is the reliable way to guarantee spawns.
A mob within 32 blocks of the nearest player never despawns due to distance. Once it is between 32 and 128 blocks it can despawn on a random per-tick roll, and past 128 blocks it despawns instantly. Naming a mob with a name tag or having it pick up gear prevents despawning regardless of distance.
The hostile mob cap scales with how many spawnable chunks are loaded: cap = floor(70 x eligible chunks / 289), where 289 is the 17 by 17 chunk area around one player at normal render distance. A single player therefore has a cap of about 70 hostile mobs. More loaded players or chunks raise the cap, and lighting up unused caves frees more of it for your farm.
Testing a farm? Spawn mobs to check it, or browse more Minecraft tools: