Mob spawning in Minecraft follows rules that are precise, documented and almost universally misunderstood. Light level is only part of it, the mob cap is doing more work than people think, and spawn-proofing a base is easier once you know what the game is actually checking.
The conditions for a hostile spawn
- Light level 0 from block light. Sky light is handled separately.
- A valid opaque block to stand on.
- Two blocks of space above it, one for some mobs.
- Within 128 blocks of a player, spherical.
- More than 24 blocks from the player.
- The mob cap for that category is not full.
All six must be true. Failing any one prevents the spawn, which is why there are several different ways to spawn-proof and why some of them work where others do not.
Block light versus sky light
Since the light engine changes, hostile mobs need block light 0. Sky light is irrelevant for most of them – a fully dark cave at midday spawns mobs exactly as it does at midnight.
On the surface, mobs spawn at night because sky light drops, but the check is still on block light for the majority. A torch every eight blocks or so covers a surprising area.

The mob cap
There is a global limit on hostile mobs near a player – the game stops spawning once it is reached. This is the mechanic that makes mob farms work: if your farm is the only valid spawning space in range, every spawn happens there.
It is also why a farm underperforms when you have not lit the caves around it. Those caves are competing for the same cap, and the cap does not care that you would prefer the spawns happened in your farm.
Spawn-proofing options
- Light – torches, lanterns, sea lanterns, glowstone. Simple, and visually intrusive.
- Slabs and stairs – bottom slabs are not valid spawn surfaces. Invisible and permanent.
- Carpets and buttons – block the space above.
- Non-opaque blocks – leaves, glass, barriers.
- Water – most hostile mobs will not spawn on it.
Slabs are the underrated answer. A floor of bottom slabs never spawns anything, needs no light, and can be made of any material, which means it does not affect how the build looks.
Lighting a base without ruining it
Torches every eight blocks is functional and looks like a cave. The alternatives – light sources hidden under slabs, in lanterns hung from chains, embedded in glowstone behind trapdoors – do the same job without dominating the room.
Building the lighting into the structure rather than adding it afterwards is the difference, and it is one of the clearest divides between a build that works and one that looks planned. Furnishing a room without a furniture mod covers the techniques that hide light sources inside furniture.

Why mobs appear inside a lit base
Almost always one of four things:
- A dark corner behind a staircase or under an overhang.
- The roof, which nobody lights.
- A cave opening inside the build’s footprint.
- Spiders, which need only a 1×1 space and climb.
The roof is the classic. A lit interior with a dark roof is a mob generator with a hole in the ceiling.
Mobs that ignore the rules
Several do. Endermen spawn at any light level in the End. Blazes spawn from spawners regardless. Drowned spawn in water below a light threshold. Phantoms spawn above you based on how long since you last slept, ignoring almost everything else on the list.
Warden spawns are not spawns at all – the Warden is summoned by noise, which is why the deep dark is a different problem entirely.
Farm placement
The best mob farm location is over an ocean, far from land, because the surrounding area contains no competing spawn spaces. The second best is in the sky above the Overworld with the caves below lit or far enough down to be out of range.
Both work because of the cap, not because of light. Understanding that is the difference between a farm that produces and one that trickles.
Practical spawn-proofing routine
- Slab the roof.
- Walk the perimeter at night and look for anything appearing.
- Check under stairs, behind doors and in corners.
- Seal any cave opening within the build footprint.
- Light the paths between buildings, not just inside them.
Doing that once at build time is far less work than doing it repeatedly after finding a creeper in the storage room.
Caves are the real source
Most mobs that reach a base came from a cave system underneath it. Sealing the entrances is more effective than lighting the surface, and finding them is a matter of exploring downward rather than outward.
The routine for doing that safely is the same one that keeps you alive generally underground, and lighting, routes and getting back out is the version worth following.
Images: Friends&Foes (Fabric/Quilt) project gallery on Modrinth.