To stop mobs from spawning in Minecraft, light up the area. Since version 1.18, hostile mobs can only spawn on blocks with a light level of 0, so a single torch protects everything its light touches. For a whole world, use the command /gamerule doMobSpawning false. This guide covers every method, current as of Minecraft 26.2 (Chaos Cubed).
You’ve built a nice house in Minecraft, but there are still zombies, skeletons, spiders, and creepers spawning inside. How do you stop mobs from spawning in your house? It’s easy once you understand Minecraft’s spawning mechanics and rules. Prevent mobs from spawning in your house today with these simple tips.
Minecraft Mobs Spawn in Total Darkness
Mobs only spawn where there is darkness, such as the inside of a poorly-lit house, a cave, or outside during the night. The first step to stop mobs from spawning in Minecraft is to use light sources such as torches, glowstone, or lamps and eliminate all dark areas.
Here is the good news: this got much easier in version 1.18. Hostile mobs used to spawn anywhere the light level was 7 or lower, which meant you needed torches everywhere. Now they only spawn on blocks with a light level of exactly 0. Any light at all, even level 1, stops spawning on that block. One torch (light level 14) protects a much bigger area than it used to.
Adding torches will also stop mobs from spawning in Minecraft dungeons. Dungeons have lots of mobs because of mob spawners, but lighting up the area will turn off the mob spawner temporarily.
Some players find it useful to install mods that highlight blocks where hostile mobs are able to spawn. You can then light up these blocks and stop the mobs before they even start spawning! This is one of the more popular ones.
Blocks That Mobs Cannot Spawn On
Even in total darkness, hostile mobs cannot spawn on certain blocks. You can use these to mob-proof tricky areas like roofs, hallways, and farms:
- Bottom slabs: Half-slabs placed on the bottom half of a block stop all spawning. Slabs placed on the top half or doubled up count as full blocks, so mobs can spawn on those.
- Carpet: A cheap way to cover big floors. Mobs cannot spawn on any carpet color.
- Glass: Mobs never spawn on glass, which makes glass roofs and floors naturally safe.
- Buttons and pressure plates: Placing these on top of blocks prevents spawning there. Buttons on a wall do nothing; they need to sit on the spawnable surface.
Only certain blocks can be crafted into slabs, including: wooden planks, stone, bricks, sandstone, cobblestone, quartz, nether brick, purpur, etc. A slab is crafted by putting three of these blocks in the bottom row of a crafting table.
Minecraft Mobs Can’t Spawn in Mushroom Biomes

In the mushroom biomes, hostile mobs will not spawn at all. This is a good option if you don’t want to deal with lighting every part of your build. Note that you can replace the mycelium on the ground with normal grass and mobs still won’t spawn. Mycelium will spread to nearby dirt blocks, so make sure you don’t allow any to touch the grass or dirt you put down.
How to Turn Off Mob Spawning in Minecraft
If you want mobs gone from the entire world instead of just one area, you have a few options:
- The gamerule command: Type
/gamerule doMobSpawning falsewith cheats enabled. This stops all natural mob spawning in the world instantly, and/gamerule doMobSpawning trueturns it back on. Already-spawned mobs stay until you clear them with/kill @e[type=!player]or a difficulty switch. - Peaceful difficulty: On peaceful, hostile mobs will not spawn and existing ones despawn. Change it in the settings or with the command
/difficulty peaceful. - Server settings: If you are running a server, set
spawn-monsters=falsein the server.properties file. Minecraft server plugins such as WorldGuard can also turn off mob spawning only in a certain area, which is perfect for protecting a spawn town while keeping mobs everywhere else.

Frequently Asked Questions
What light level stops mobs from spawning?
Any light level above 0. Since Minecraft 1.18, hostile mobs only spawn on blocks at light level 0, so even the dimmest light source spawn-proofs the blocks it reaches.
Do torches stop mobs from spawning?
Yes. A torch gives off light level 14, which spreads out and keeps every nearby block above light level 0. That completely prevents hostile mobs from spawning in its glow.
How do I stop mobs from spawning without changing the difficulty?
Use the command /gamerule doMobSpawning false with cheats enabled. It turns off natural spawning for the whole world while keeping your difficulty setting the same.
Can mobs spawn on carpet or slabs?
No. Mobs cannot spawn on carpet, bottom-half slabs, glass, buttons, or pressure plates, even in complete darkness.
Why are mobs still spawning in my lit-up base?
Check for dark spots you missed, like corners behind furniture, spaces above your ceiling, or caves under your floor. Mobs you hear may be spawning in hidden air pockets below the base rather than inside it.
That concludes our guide on how to stop mobs from spawning in Minecraft! Did these tips keep the creepers out of your house? Leave a comment below!




bruh man
Thursday 24th of June 2021
/gamerule doMobSpawning false
JL
Tuesday 13th of April 2021
Hello, Why can't you simply turn off spawn monsters and leave difficulty to normal (or whatever you want)? Doesn't that work? (Java edition)