- See also: Multiplayer spawning details
New players will initially spawn within a small area surrounding the world spawn point when the server is not in adventure mode. This area is 20x20 blocks in singleplayer and reduced to 10x10 blocks in multiplayer, while the area itself is offset in the Northwest direction of the world spawn point. Upon death, the player will then respawn within this area unless they have had their individual spawn point changed.
When spawning, the player will be placed upon the highest block of the matching X and Z location that they have spawned at, even if this would set the player above the maximum build height. This area will not consider the existence of a block to spawn on, which can result in players spawning above the Void if there are no blocks at that X and Z location. The world spawn point itself can be changed using the
The world spawn point also determines the center of the permanently loaded spawn chunks.
When the server's settings set the default gamemode to adventure mode (using the server.properties), then the normal spawning mechanic is ignored and players are spawned directly on the world spawn. This includes the x, y and z coordinates and even if there is no block there and even if there are blocks above it.
If the y coordinate is not a valid spawning area then the server looks up until it finds one, at most players can spawn at y 256.
If there is space to spawn but it is in the middle of the air, the player will spawn in the middle of the air, even falling into the void if there is a hole.
The spawnpoint can be changed using
/setworldspawn and it follows the same rules.
The individual spawn point of the player can be changed by lying in a bed or using the
/spawnpoint command. If the individual spawning area of the player is obstructed upon their death, they will be forced to respawn at the world spawn. Lying in a bed will allow for leniency in obstruction, in that the player will attempt to respawn on other blocks near the bed if the original point becomes blocked. If the spawn point set via
/spawnpoint becomes obstructed, the player will not be given this leniency in respawning.
Approximately one in ten newly generated chunks will contain mobs, usually in packs of up to four of the same species. They will always spawn on the highest available block in a column i.e. the one that can see the sky. For an animal to spawn on it, this block must be opaque and the two blocks above it must be transparent. The block does not need to be a grass block nor does it need to be illuminated (as it does with Mob Spawning).
Randomness for animal spawning is derived from the world seed, which means that worlds with the same seed will generate chunks with the same animals in the same places.
Very rarely, new animals can spawn in already generated chunks, just like monsters do. When animals spawn in this way, they do so only on grass blocks with light level 9 or greater above them. This is also a requirement for animals spawning from monster spawners. Unlike monsters, animals do not spontaneously despawn, except for wild ocelots and wolves (which can despawn only when they are hostile).
Mobs are broadly divided into four categories: hostile, friendly, water (i.e. squid) and ambient (i.e. bat). Hostile mobs have a spawning cycle once every game tick (1/20th of a second). Friendly and water mobs have only one spawning cycle every 400 ticks (20 seconds). Because of this, hostile mobs can spawn at any time, but animals spawn very rarely. Instead, most animals spawn within chunks when they are generated.
Mobs spawn naturally within a square group of chunks centered on the player. In single-player mode, this area will be 15×15 chunks (240×240 blocks), but in multi-player mode the size can vary with the server settings. When there are multiple players, mobs can spawn within the given distance of any of them. However, hostile mobs (and some others) that move farther than 128 blocks from the nearest player will soon despawn (see Despawning), so even with a larger chunk loading radius, the mob spawning area is more-or-less limited to spheres with a radius of 128 blocks, centered at each player.
Mob caps are directly proportional to the total number of chunks eligible for spawning. To calculate the cap, the spawning area is expanded by one chunk in every direction (so the default gives 17×17 chunks), then the total number of chunks is plugged into the following formula:
cap = constant * chunks / 256
Each mob category has a separate cap and a different constant in the formula:
Hostile = 70 Passive = 10 Ambient (Bats) = 15 Water = 5
In single player mode, the chunk count is 17×17 = 289, and the caps work out to:
Hostile = 79 Passive = 11 Ambient = 16 Water = 5
In multiplayer, chunks that are in range of multiple players are only counted once. So the more spread out the players are, the more chunks will be covered and the higher the caps will be.
The cap is checked once at the beginning of each spawning cycle. If the number of living mobs in a category is over its cap, the entire spawning cycle for that category is skipped.
For each spawning cycle, one attempt is made to spawn a pack of mobs in each eligible chunk. A random location in the chunk is chosen to be the center point of the pack. For the pack to spawn at all, the center block must be water for water mobs and air for all other mobs. Note that in the latter case, it must actually be an air block. Any other block, even a non-colliding one, will prevent the entire pack from spawning.
If the pack location is suitable, 12 attempts are made to spawn up to 4 mobs (8 for wolves, 1 for ghasts) within a 41×1×41 area centered at that block (that's a 41×41 square that is one block high). Mobs will spawn with the lowest part of their body inside this area. For each spawn attempt, a block location within the pack area is chosen at random. Though the pack area extends 21 blocks out from the center, the random location is heavily skewed toward the center of the pack. Approximately 85% of spawns will be within 5 blocks of the pack center, and 99% within 10 blocks of the center.
All mobs within a pack are the same species. The species for the entire pack is chosen randomly from those eligible to spawn at the location of the first spawn attempt in the pack:
- In the Overworld, this depends on the biome:
- Most biomes can spawn sheep, pigs, chickens, cows, spiders, zombies, skeletons, creepers, endermen, slimes (only in certain chunks if not in a swamp), witches, and squid.
- Forest, Taiga, and Mega Taiga biomes and their variants can also spawn wolves.
- Plains and savanna biomes can also spawn horses.
- Jungle biomes can also spawn ocelots.
- Desert, beach, river, and ocean biomes cannot spawn animals; only hostile mobs and squid.
- Mushroom biomes can spawn only mooshrooms.
- There are actually two ways for a slime to naturally spawn without a monster spawner: In any eligible chunk under layer 40, or in a swamp biome at a low light level.
- Cave spiders spawn only from their specific monster spawners, which are found in mineshafts among many cobwebs.
- Silverfish spawn from special stone, cobblestone, and stone brick blocks found in strongholds and extreme hills biomes. They also spawn from specific spawners found in strongholds.
- Blazes spawn from their specific spawners in nether fortresses and can also spawn elsewhere in the structures.
- Wither skeletons and skeletons can spawn in nether fortresses.
- The Nether itself can spawn only ghasts, zombie pigmen, and magma cubes.
- The End can spawn only endermen.
- The ender dragon spawns naturally in The End; but only one, ever; and not as part of the general mob spawning process.
- Snow golems, iron golems, and withers only spawn when built with the exception of iron golems spawning in villages with 10 villagers and enough houses.
Each individual spawn attempt succeeds only if all of the following conditions are met:
- There must be no players and no player spawn points within a 24 block distance (spherical) of the spawning block
- If it's a squid, then...
- If it's not a squid, then...
- the block directly below it must have a solid top surface (opaque, upside down slabs / stairs and others)
- the block directly below it may not be bedrock
- the spawning block itself must be non-opaque and non-liquid
- the block directly above it must be non-opaque
- the spawning mob hitbox must not be obstructed by solid blocks, other mobs or liquids
- If it's an animal, then...
- the block directly below the spawning block must be grass
- the light level of the spawning block must be 9 or brighter
- If it's an ocelot, then...
- If it's a hostile mob in the overworld, then...
- the light level of the spawning block must be 7 or darker, and more light increases the chance that the spawn will fail
- sunlight falling on the spawning block further increases the chance that the spawn will fail, by up to 50%
- If it's a slime, then...
- the spawning block must be in a chunk eligible to spawn slimes (see the slime page for details)
- the spawning block must be below level 40
- if the spawn is in a swamp biome, the light level has to be 8 or darker, and the spawning block be on level 51 through 69
- there is an additional 90% chance the spawn will fail, thus slimes only spawn 1/10th as often as other mobs, all other things being equal
- If it's a ghast, then there is a 95% chance the spawn will fail, thus ghasts only spawn 1/20th as often as other mobs
If all of these conditions are met then the mob is spawned. The pack is complete when 4 mobs have spawned (or 8 wolves, or 1 ghast), or 12 attempts have been made, whichever comes first. The exception(s) to these rules is the ender dragon or the wither.
- Due to the general block checks, all mobs besides squid must spawn on top of an opaque block with at least two blocks of headroom, even ghasts, etc. However, short mobs can spawn in a one block high space if the block above is transparent, like a glass block or piston.
- While individual mobs can spawn inside signs, pressure plates, and other non-opaque blocks, packs cannot. They need a completely empty block in the center. Since a pack spawns all at one level, there needs to be some air blocks right above a flat surface to allow mobs to spawn on it, and more air blocks will always allow more spawning.
- Similarly, buildings surrounded by air will spawn more mobs inside than underground rooms because packs that spawn outside of the building can spawn mobs inside it.
- The mob caps tend to be reached in seconds. Because of this, mobs can be funneled into a spawning room by preventing them from spawning outside of it.
- The caps also mean that the faster mobs are killed, the faster they will spawn.
- Because the caps are only checked at the beginning of a spawn cycle, they can be dramatically exceeded when a large number of mobs spawn in a single cycle. This happens often with squid, which have a fairly low cap (5 in single player) but can spawn in the hundreds in a single cycle, in an area with lots of water.
- In multiplayer, mob caps are shared by all players, no matter where they are. If one player can make a lot of mobs spawn near them, say, with a mob farm, players elsewhere in the world will see fewer mobs of the same category. Likewise, if a player can prevent mobs from spawning near them, perhaps by hanging around a large body of water and illuminating nearby caves, they will effectively dump their mobs on everyone else.
- Mobs used to not spawn above y co-ordinate 240 due to a bug, but as of 1.4.6 this is fixed and mobs now can spawn above level 240.
- In multiplayer, if the server.properties file has "view-distance=9" or below, mob spawning is severely reduced (or they de-spawn too quickly), and may result in the player encountering no mobs at all. Set the view distance to 10 or higher to ensure mobs spawn correctly.
Other types of spawning
A monster spawner causes mobs to spawn constantly in the area around it.
A thrown egg has a 1 in 8 chance of spawning a chicken, and an additional 1 in 32 chance of spawning 4 chickens from a single egg, so there is a total of 1 in 256 chance for a single thrown egg to spawn 4 chickens.
Cows, chickens, pigs, sheep, mooshrooms, villagers, ocelots, wolves, horses and donkeys can breed. All of this requires a player to breed them except for villagers.
A snow golem, iron golem, or wither can be made to spawn if a player builds the proper structure out of blocks. Iron golems can also spawn in sufficiently populous villages. See their respective pages for full details.
A monster egg will spawn a silverfish if broken, or if a nearby silverfish is attacked.
- This is meant to imply they are coming from the Nether, but in fact is a true spawn.
- Zombie pigmen, like any other mob, can also travel through such portals in either direction, but they do need to come from a loaded chunk. In single-player, if the player is in the Overworld, no Nether chunks are loaded.
- If a mob does enter a portal, if the chunk on the other end isn't loaded (i.e. if no players are nearby and the other end isn't in a spawn chunk) the mob will be "frozen in time". As a result the next time a player goes through the portal the mob will unfreeze and be right there beside the portal. Players attempting to dispose of lots of mobs via nether portals will get swarmed the next time they go through. However if they enter the nether at a different location and approach the "swarmed" portal from a distance the mobs will "unfreeze" the moment the edge of the player's loaded chunk radius reaches them and hopefully will wander off before the player gets there.
- Note that after passing through a portal, non-player mobs cannot re-enter the portal for some time (even after the chunk later gets loaded), and Overworld-spawned zombie pigmen are likely under the same restriction.
Monsters (not holding items or wearing armor) and squid (but not animals), including hostile wolves as of 1.1, can cease to exist, or "despawn", under certain conditions:
- A mob that has had no player within 32 blocks of it for more than 30 seconds has a 1 in 800 chance of despawning on each game tick (1/20th of a second). Therefore, the half-life of monsters not within 32 blocks of a player is 27.73 seconds (after the initial 30 seconds have elapsed).
- A mob will immediately despawn if there is no player within 128 blocks of it. Note that this is a Euclidean sphere, not a cylinder from map top to bottom and not a taxicab sphere (which is more like an octahedron). Example: A mob at 0/y/0 will remain at least 30 seconds (as above) if the player moves to 65/y/65 (real distance 91.9), but despawns immediately if the player moves to 91/y/91 (real distance 128.7).
- All hostile mobs (including those that are holding items) in a world will despawn if the difficulty is set to peaceful, regardless as to where the player is positioned in the world.
- In multiplayer, despawning does not occur while there are no players in the game.
- A monster which has been named with a name tag will not despawn. However, one created from a renamed spawn egg will despawn as normal.
- If a monster is holding any items or wearing any armor that was given by a player or picked up from the ground, it will not despawn.
|0.24_06||Mobs spawn in groups.|
|The spawning area used to be 17x17 chunks rather than 15x15. The area was reduced, but the old size is still used to calculate mob caps.|
|It was not always possible to funnel mobs into a spawning room by preventing them from spawning elsewhere. Some older sources of information about spawning might make reference to this.|
|Large amounts of empty space used to encourage spawning in the general area. This remains true on a smaller scale, and only horizontally, due to pack spawning.|
|1.2.0||The chunk 0,0 (X 0-16 and Z 0-16) is no longer always the first chunk evaluated for mob spawning. If one built a dark room inside that chunk, all mobs would spawn inside that room and nowhere else.|
|1.8||The spawn location is no longer always on sand or gravel, even if it wasn't on a beach.|
|1.0.0||Previously, spawn was determined by light level rather than the current chunk properties. This was no longer the case in 1.0.0. In a Beta world, hostile mobs would spawn in light level 7 or lower while friendly mobs would spawn in light levels 9 or higher. Because of this, hostile mobs had a slight chance of spawning even though it was light due to them spawning in the air where there was little light. If you had a lot of torches down, go down to your mine, then return, you would have a tendency to find your house having some cows, pigs, chickens or sheep running about.|
Issues relating to "Spawn" are maintained on the issue tracker. Report issues there.
- Sometimes it is possible for the world spawn to be underground or in the ocean.
- World spawns can even be inside a dungeon or a village. (very rarely)
- Sometimes the spawn point of a world is supposed to be right next to a block, but rarely a glitch occurs and the spawn point is in the block.
- It is possible for the spawn point of a world to be in a lava lake, in which case starting a game in Survival is nearly impossible unless there is water nearby.