From Minecraft Wiki
Jump to: navigation, search
This page is part of the Icelandic translation project.


Þessi grein þarfnast lagfæringar.
Description: Kanínur mynda í eyðimerkur með new chunks and with the spawn cycle. A comprehensive check that this article is up-to-date to 1.9 is in order.

Myndandi minnist á leikmenn og mobs being created and placed in the game world.

Player spawning[edit]

World spawn[edit]

World spawning area. White represents the extent of singleplayer, blue represents multiplayer, and yellow represents the world spawn point.

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 20 × 20 blocks by default, but can be changed by the spawnRadius gamerule in both single and multiplayer. 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 also determines the center of the permanently loaded spawn chunks.

The world spawn point itself can be changed using the /setworldspawn command.

Adventure mode[edit]

When the server's settings set the default game mode to adventure mode (using the, then the normal spawning mechanic is ignored and players are spawned directly on the world spawn. This includes the X, Y and Z coordinates, 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.

Individual spawn[edit]

The individual spawn point of the player can be changed by sleeping 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.

Sleeping 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.

Natural generation[edit]

Many mobs generate upon initial chunk creation. These spawns will only happen once per chunk. They are not affected by the /gamerule doMobSpawning command.


A cow that generated with the map inside a tree's leaves and could not escape, a common sight in forested hill areas.

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. 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.

Animals do not spawn in desert, beach or ocean biomes, with the exception of rabbits, squid, and turtles and only mooshrooms will spawn in mushroom fields biomes. Rabbits can only spawn in desert, flower forest, snowy tundra, taiga, giant tree taiga, and snowy taiga biomes, and mooshrooms can only spawn in mushroom fields biomes.

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.

Other mobs[edit]

The mobs still spawn if the /gamerule doMobSpawning command is set to false.

Spawn cycle[edit]

Java Edition and Legacy Console Edition[edit]

Mobs are broadly divided into four categories: hostile, friendly, water (e.g. squid) and ambient (e.g. bat). Hostile mobs have a spawning cycle once every game tick (120 of a second). Friendly and water mobs have only one spawning cycle every 400 ticks (20 seconds). Because of this, where conditions permit spawning, hostile mobs spawn frequently, but passive mobs (ie: animals) spawn very rarely. Most animals spawn within chunks when they are generated.

Mobs spawn naturally within a square group of chunks centered on the player, 15×15 chunks (240×240 blocks). 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 instantly despawn, so the mob spawning area is more-or-less limited to spheres with a radius of 128 blocks, centered at each player. In multiplayer, mob caps are shared by all players, no matter where they are.

Mob cap[edit]

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:

 mobCap = constant * chunks / 289

Each mob category has a separate cap and a different constant in the formula:

 Hostile = 70 
 Passive = 10
 Ambient (Bats) = 15
 Water (Squids) = 5

In single player mode, there are always 289 chunks in range so the caps above are used. 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 number of mobs is checked once at the beginning of each spawning cycle against the cap. If the number of living mobs in a category is over its cap, the entire spawning cycle for that category is skipped. The area checked for mobs is the same as the area used for calculating the mob cap, which is the spawning area expanded by one chunk in every direction.

Pack spawning[edit]

Example of a mob pack spawning. The 41×1×41 spawning area is shaded blue (not to scale). The yellow figures represent the actual positions that mobs could spawn in after checking the environment. Note that the mobs can spawn inside torch and ladder blocks. But they can't spawn on top of glass because it's not opaque. The red cube is the center of the pack.
Requirements for the spawning location of individual mobs.

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 non-opaque, or must not fill its entire cube, or must be powered.

If the pack location is suitable, up to 12 attempts are made to spawn up to a pack, which is 8 wolves, 1 ghast, 3 rabbits, or 4 of any other mob. The pack is spawned within a 41×1×41 (that's a 41×41 square that is one block high) area centered at the initial block. 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:

Spawn conditions[edit]

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
  • There must be fewer loaded mobs of that type than the mob cap for that mob.
  • Ef það er smokk, guardian/is, drukknaðan uppvakning, fisk eða höfrung...
    • the spawning block must contain liquid (water)
    • If it's a squid, then...
      • the spawning block must be between level 46 and 62, inclusive
      • the spawning mob must not be obstructed by other mobs
    • If it's a guardian, then...
      • the difficulty must not be peaceful
      • 95% chance of failure if the spawning block has sky exposure (details)
  • If it's not a squid, guardian, a drowned, a fish or a dolphin, 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 or barrier
    • the spawning block and the block above must be made of a material that does not block movement, must be non-liquid and not powered, and cannot be rails, powered rails, detector rails, or activator rails.
    • the spawning mob hitbox must not be obstructed by solid blocks, other mobs or liquids
  • If it's a bat, then...
    • the spawning block must be at level 62 or below
    • If the real-time day is between October 20 and November 3, then the light level must be 7 or darker. Otherwise the light level must be 4 or darker.
  • If it's an animal (other than a mooshroom or ocelot), then...
    • the light level of the spawning block must be 9 or brighter
      • the block directly below the spawning block must be grass
  • If it's a mooshroom, then...
    • the light level of the spawning block must be 9 or brighter
      • the block directly below the spawning block must be mycelium
  • If it's an ocelot, then...
    • the spawning block must be above level 63
    • the block directly below the spawning block must be grass or leaves
    • there is a 13 chance the spawn will fail
  • If it's a hostile mob (except as noted below), then...
    • the difficulty must not be peaceful
    • the light level of the spawning block must be 7 or darker (with exception during thunderstorms), 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 light checks in the general hostile mob check don't apply
    • one of the following must be true:
      • option 1:
        • 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
        • 90% chance of failure
      • option 2:
        • the spawning block must be in a swamp biome
        • the spawning block be on level 51 through 69 inclusive
        • chance of failure based on the phase of the moon
        • the light level of the spawning block must be 7 or darker, and more light increases the chance that the spawn will fail
        • 50% chance of failure
  • If it's a ghast, then...
    • the light checks in the general hostile mob check don't apply
    • there is a 95% chance the spawn will fail, thus ghasts only spawn 120 as often as other mobs
  • If it's a blaze, then...
    • the light checks in the general hostile mob check don't apply
    • the light level must be 11 or darker

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 3 rabbits), 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 squids, drowned, fish, dolphins and guardians 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.
  • Individual mobs and packs can spawn inside signs, and other blocks that have no collision boxes. However, they cannot spawn on any type of rails or on pressure plates.
  • 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 new mobs 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.
  • If the player's view distance or the server view distance in multiplayer is at 9 or below, mob spawning is severely reduced (or they despawn 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.

Bedrock Edition[edit]

Natural spawning in Bedrock Edition shares only a few similarities to natural spawning in Java Edition. In Bedrock Edition, there are two main types of natural spawns: pack spawns and structure mob spawns. Structure mob spawns are mobs spawned as part of a structure, such as nether fortresses, witch huts, etc. Pack spawns account for all other types of natural spawns, including mobs that spawn individually (i.e. not in a pack of 2 or more). Both types of natural spawns follow the same rules for spawn conditions and the mob cap.

Mob spawning is evaluated for every chunk within a 6 chunk cylindrical radius of the player that is ticked; if the simulation distance is smaller than 6 chunks, then only chunks within the simulation distance will be able to spawn mobs. There is a 1 in 200 chance of the mob spawning algorithm attempting to run per chunk, per-tick.

Mob Cap[edit]

There are two main mob caps that affect spawning: a global mob cap and a mob density cap. The global mob cap for natural spawns is set at 200 regardless of difficulty. The global mob cap only affects natural mob spawning, and does not affect mobs spawned through breeding, spawn eggs, the /summon command, monster spawners or any other type of mob spawning. Only mobs that are within ticking areas (both those around players and those set manually using the /tickingarea command) count towards the global mob cap; mobs not ticked do not count towards the global mob cap. Mobs can also have their own individual cap listed below:

Individual Mob Caps
Mob Surface Cap Cave Cap
Ghast 0 2
Creeper 5 Unlimited
Other Unlimited Unlimited

Alongside the global mob cap is a mob density cap. The mob density cap limits how many mobs of each type and category can spawn within a 9x9 square region surrounding each chunk eligible for spawning. Mobs in chunks outside a ticking area count towards the mob density count. The density cap is split up into two distinct categories: a cap for surface mobs, and a cap for cave mobs. Cave mobs do not count towards the surface mob cap, and surface mobs do not count towards the cave mob cap. Whether a mob counts as a surface mob or a cave mob is determined by where it spawned, not where it happens to be at the moment.

There are four categories of mobs: ambient, animal, monster, and water. The mob density cap for each category and location of mob in each dimension is as follow:

Mob Density Caps
Category Location Overworld Nether The End
Ambient Surface 0 0 0
Cave 2 0 0
Animal Surface 4 0 0
Cave 0 0 0
Monster Surface 8 0 10
Cave 8 16 8
Water Surface 4 0 0
Cave 0 0 0

Spawn Conditions[edit]

The following rules apply to all mobs:

  • Can only spawn 24 blocks spherical radius or further from the player.
  • Cannot spawn if the block below them is air.
  • Cannot spawn if that mob would collide with an existing mob.
  • Cannot spawn on slabs or carpet.

Some additional rules apply to specific categories of mobs.

For water mobs:

  • Cannot spawn outside of liquid.

For monsters:

  • Cannot spawn if the light level is greater than 7.

For non-water mobs:

Pack Spawning[edit]

Pack spawning happens in two stages: first attempt to spawn surface mobs, then attempt to spawn cave mobs. Before spawning, the mob density cap is calculated based on the 9x9 square area surrounding the current chunk. Spawning begins by picking a random X and Z location within the chunk currently being evaluated. The Y coordinate is determined by starting at the world height and searching downwards for the next solid block with a non-solid block above it. The first such block that is found is considered to be the surface, and the algorithm will attempt to spawn a surface mob pack. The algorithm then continues to search downwards for the next solid block with a non-solid block above it. When a block meeting the criteria is found, the algorithm attempts to spawn a cave mob pack at that block location. Cave spawn attempts continue until the Y coordinate reaches the world bottom, and do not stop even if a cave pack was spawned.

Surface and cave pack spawn attempts then go through the following steps to figure out what mob to spawn and how many:

  1. Picks a random mob.
    • If the current spawn location is in a liquid, pick a random water mob.
    • If the light level is greater than 7, there is no other blocks above the current location, and the current location is a grass block, pick a random animal mob.
    • Otherwise, spawn a monster mob.
  2. Picks a random number of mobs to spawn in the pack. Each mob can have its own min and max pack size, and the pack size can depend on difficulty.
  3. Make sure the spawn location has suitable spawn conditions.
  4. Limit the number of mobs spawning based on the global mob cap. If the mob count is already at or exceeds the mob cap, no mobs will spawn.
  5. For each mob to spawn, check that spawning it would not exceed the mob density cap.
    • If spawning the mob would not exceed the mob density cap, then the probability the mob will spawn can be calculated using the formula: (mob density cap - current mob density count) / mob density cap
  6. Finally, attempt to spawn the mob in the world
    • Spawning the mob can fail; for example, if spawning it would cause it to spawn inside of a block or part of a wall.

Other types of spawning[edit]

  • Cows, chickens, pigs, sheep, mooshrooms, villagers, ocelots, wolves, horses, donkeys, and rabbits can breed. All of these require a player to breed them except for villagers.
  • 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.
  • 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.
  • Zombies can spawn in large groups in villages at midnight ignoring most of the usual restrictions, forming a siege. It could even happen in mushroom biomes or if /gamerule doMobSpawning is false. The game will make 10 attempts to spawn a zombie within a 17x7x17 area centered on a block within the village's cylindrical radius, at the same Y level as the village center.
  • Zombie pigmen can spawn from nether portals in the Overworld. Lighting and player proximity don't prevent this.
  • Endermites can spawn randomly when a player uses an ender pearl.
  • Killing medium and large slimes and magma cubes will spawn more of them, but in a smaller size.
  • When a pig gets struck by lightning, it is replaced by a newly spawned zombie pigman.
  • When a villager gets struck by lightning, it is replaced by a newly spawned witch.
  • If a creeper gets struck by lightning, it becomes charged.
  • A monster spawner causes mobs to spawn constantly in the area around it. Spawners may naturally generate spawning zombies, skeletons, spiders, cave spiders, silverfish, or blazes, but may be made to spawn other mobs using commands or spawn eggs. Mobs have the same spawning conditions they would have from a natural spawn, except hostile mobs may spawn without a block below them.
  • In Creative, the player can use spawn eggs to spawn most mobs. When mobs are spawned this way, all normal spawning requirements, such as light level and block type, are ignored.
  • Any entity can be spawned using the /summon command.


Java Edition and Legacy Console Edition[edit]

Various mob spawning ranges, illustrated.

Monsters (other than converting zombie villagers), bats, squid, ocelots (after having existed for over 2400 ticks), chickens from Chicken Jockeys, and hostile or untamed wolves[verify] 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), which is a 2.47% chance per 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).
    • The chunk the mob is in must still be loaded to the mob to despawn. Otherwise the mob will be frozen until the chunk is loaded again when the player approaches it, and possibly find the same mob again. Because the chunks loaded form a square around the player (if there is only one) while the distance needed for the despawning to happen is the euclidean one, moving in a diagonal direction compared to X/Z axes, and possibly taking some vertical distance, can help keeping the chunks loaded and make the monster despawn. Also, improving rendering distance helps, as this makes the game load more chunks.
  • 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.
  • Chickens that originally spawned as chicken jockeys follow zombie despawn rules, rather than chicken despawn rules. In other words, they will despawn.

Bedrock Edition[edit]

In Bedrock Edition, each loaded chunk has a 1 in 50 chance each tick of trying to despawn an entity. If selected, a random entity in the chunk is chosen and despawned, subject to all of the following conditions:

  • The entity is more than 54 blocks circular radius away from the nearest player.
  • The light level is lower than 8.
    • For monsters, the light level is greater than 8, and if it is a surface mob, it is day time.
  • The entity is older than a certain age (the exact age is unknown and may depend on the type of entity).
  • The entity does not have persistence (see below).


In Bedrock Edition, entities with persistence do not despawn naturally. Entities are given persistence in the following situations:

The following entities always have persistence:


Java Edition Classic
August 25, 2009Mobs shown to 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.
Java Edition Alpha
v1.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.
Java Edition Beta
1.8?The player's spawn point is now bound to a specific biome rather than to any sand block (when this was first the case is unknown). The player can spawn in forest, swamp and taiga biomes.
Java Edition
1.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.
1.112w01aThe biomes valid for the player's spawn location were adjusted. Players can now spawn in forest, plains, taiga, forest hills and taiga hills biomes.
1.212w03aThe player's spawn point can now also be located in jungle and jungle hills biomes.
1.814w25aMost restrictions on the pack location are removed. Formerly it had to be an air block, now any non-opaque block will do.
1.915w46aWhen spawning mobs, the spawning block cannot block movement (formerly just had to be non-opaque) and cannot be any type of rail. Also the block above can no longer be liquid.
15w51aAdded spawnRadius gamerule to control the size of the world spawn area.
pre2Pack spawning mechanics adjusted, "12 attempts" is now "up to 12 attempts" and is even more heavily weighted towards the center.


Template:Issue list/is


  • In older versions, 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. This was fixed in 1.9, so that lava lakes fail to generate in the world spawn area.
  • The world spawn (the point where players spawn if they have no valid bed spawn) is usually a random (seed determined) point between -500 and +500 on the X and Z axis. If the chosen point is in water (due to nothing, but ocean biomes in the -500 to +500 range), a second attempt will be made between -1500 to +1500. If this fails due to ocean, the game gives up and puts the world spawn in the middle of the ocean (still at the surface) (attempting to play the flat lands preset Water World does, this for example). Normally, however, if a player spawns in the water, it will be next to the shore because the world spawn itself picked a spot on dry land.
  • Players spawn within a 10 block radius of the block space of the world spawn (so the possible area is a 21x21 box). Checks for valid spawn locations within this 21x21 area treat liquids as air (before 1.13's liquid changes). Thus, if you get a lava spawn, it's possible to keep trying your luck, as usually not every space within the 21x21 box will be within the lava lake.

External links[edit]