Mobs appear around you all the time according to a set of spawning rules. Knowing them lets you keep your base safe, and build farms that put those rules to work.
Hostile Mobs
- Most hostile mobs, such as zombies, skeletons, creepers and spiders, spawn on solid blocks with a block light level of 0. Any torch or lantern nearby stops them.
- On the surface they spawn at night or during thunderstorms. In caves they spawn at any time.
- They spawn between 24 and 128 blocks from the nearest player, and most despawn when no player is within 128 blocks.
- Some mobs have their own rules: slimes spawn in swamps and slime chunks, phantoms above players who have not slept, and drowned in water.
Animals
- Farm animals mostly spawn when the world is first generated, on grass in daylight. They do not despawn, so the animals you find are worth keeping.
- Fish, squid, bats and axolotls keep spawning in their habitats over time.
Spawners
- Spawners are cages that keep creating one type of mob. They are found in dungeons (zombies, skeletons or spiders), mineshafts (cave spiders), nether fortresses (blazes) and strongholds (silverfish).
- A spawner only works while a player is within 16 blocks.
- Trial spawners in trial chambers release waves of mobs and give you loot when you beat them.
- Spawners cannot be collected in Survival, but you can build a mob farm around one.
Keeping Your Base Safe
- Light every dark corner with Torches or Lanterns, so no block is left at light level 0.
- Mobs cannot spawn on glass, bottom slabs, carpets and other non-solid or see-through blocks.
- You cannot sleep while hostile mobs are close by, so light the area around your bed too.
Mob Farms
Mob farms put these rules to work: a dark platform where mobs spawn, water that pushes them to a drop, and a collection point. They give you bones, arrows, gunpowder, string and experience.
Tips
- Open the F3 screen in Java Edition to see the light level where you are standing.
- Carry torches into caves and place them as you go.