Base Defense
How to Mob-Proof Your Base
A safe base is a math problem, not a fortress. Keep every surface at light level 8+cap your walls with a spider ledge, and seal the dark cave underneath. Do those three and zero hostiles spawn inside your perimeter.
The 8-and-up rule
Hostile spawns are gated entirely on light level. 0 = mobs spawn, 1-7 = still risky8+ = fully spawn-safe. Light every floor, ceiling and ledge to that line and the only way a mob reaches you is by walking in from outside, which the slabbed-and-lit perimeter shuts down. Spiders are the exception since they climb and ignore light, so the overhang ledge does the work lighting can't.
Quick answers
+What light level stops mobs spawning?
Light level 8 or higher. At 7 or below, hostile mobs can still spawn on solid blocks; at 0 they spawn freely. Build to 12+ so you have margin and never drop under 8.
+Do torches still work for spawn-proofing?
Yes. A torch emits light level 14 and stops spawns in roughly a 7-block radius before the light falls under 8. Lanterns and glowstone do the same and look cleaner; sea lanterns and glowstone are full-block and great for ceilings.
+How do I stop spiders climbing my walls?
Spiders need a 2-wide gap to climb and they ignore light. Add a 1-block overhang ledge at the top of the wall, or finish the wall with iron bars / a fence lip. The outward lip means there is nothing above for the spider to grab, so the climb stops.
+Why do mobs still appear inside a fully lit base?
Almost always a dark roof, an unlit cave underneath, or a single dark corner under stairs/overhangs. Press F3 in Java to read the block light level and hunt the dark spot. One unlit block can spawn a creeper.
+Do I need to slab the whole area around my base?
Not the whole world. Cover or light a ring about 24 blocks out, the range mobs spawn from the player. Bottom slabs, carpet, or path lanterns all deny the spawn surface. Most players just light the perimeter instead.
+What about phantoms and creepers specifically?
Phantoms spawn above you in open sky after 3 in-game days without sleep, so a roof plus regular sleep handles them. Creepers come from dark ground spawns, so the same light-to-8 rule kills the threat at the source.