Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Mob spawning

From SAS Gaming Wiki
Revision as of 11:12, 3 May 2026 by SyncBot (talk | contribs) (Sync: new page from Minecraft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
File:Hostile and Peaceful.png
A naturally spawned creeper and Minecraft:chicken at Minecraft:night.

Mob spawning is how passive, neutral, and hostile Minecraft:mobs are created in the Minecraft:world.

Mob spawning on chunk generation

Template:Exclusive

As new Minecraft:chunks are generated, they have a chance to generate an initial set of Minecraft:mobs from the "creature" category (i.e. most naturally-occurring land animals<ref group="A">Even though Minecraft:ocelots are animals and count against the "creature" mob cap, their spawn in jungle biomes is configured as part of the "monster" category. (Template:Bug) As a result they never spawn on chunk generation.</ref>) along with them, ignoring the mob cap, any applicable spawn costs, and the setting of Template:Cmd. Any randomness affecting this entire process is derived from the Minecraft:world seed and the position of the chunk that is being generated. Even though biome distribution within the chunk is already known at this point in the generation, the biome of the north west corner of the chunk at the maximum world height is used to make all decisions about this spawning process. As a result, biomes that generate only underground can never affect the initially spawned mobs. Similarly, although structures have been generated already, their potentially configured spawn overrides are ignored. The spawn conditions for most animals prevent them from spawning on "non-terrain blocks", so they won't end up generating on the roofs (or inside) of structures.

The selected biome supplies all relevant mob spawn settings for this process:

  • a weighted list of mobs configured for the "creature" category (see below)
  • an overall "creature spawn probability"
Biome-specific Creature Spawn Probabilities
Biome Probability
Template:BiomeLink 0.03
Template:BiomeLink 0.03
Template:BiomeLink 0.07
Template:BiomeLink 0.07
Template:BiomeLink 0.04
all others 0.1

If creatures are configured for the biome at all (see #Spawned Creatures for details), the game performs a loop of spawn attempts until it fails the random check against the creature spawn probability before each iteration. (If the very first check fails, no creatures are generated. Subsequent iterations of the loop are increasingly less likely to happen.)

  • Each iteration starts by selecting an entry from the weighted list of configured creature spawns. Based on that entry's minimum and maximum group size, a random target pack size (number of creatures to spawn) is determined.
  • A random horizontal position within the chunk is picked as center of the spawn attempts, which is used for the first mob spawn attempt. Subsequent attempts randomly moveaway from the previous position up to 5 blocks in X and Z direction using a triangular distribution. If that position ends up being outside the chunk, a new offset position is determined the same way, but using the initially selected center position. The vertical position of each individual spawn attempts is on top of the highest block with a non-empty collision shape at the selected horizontal position. (This is different from spawn cycle spawns, which happen at the same Y-level for the entire pack.)
  • Up to four attempts to find a valid position are made per pack member, each with a random horizontal offset around the center position as described above. Mobs usually spawn on the center of a block, but if a mob's collision box would be partially outside the chunk this way, e.g. because it is wider than a block, its precise position is adjusted to fits the mob's collision box into the bounds of the chunk. The initial horizontal orientation of the spawned mob is random.
  • The usual spawn conditions (such as Minecraft:light level, valid blocks to spawn on, and absence of obstructions) for the selected mob are validated at the selected position. If those checks succeed, the mob is added to the world and the iteration completes.

Spawned monsters

Template:Empty section

Spawned creatures

Most biomes define one or more creature spawn configurations. These spawn configurations also apply if the mobcap is not filled and regular spawn cycle spawning of animals happens. The following biomes don't spawn any mobs from the "creature" category at all: Minecraft:pale garden, Minecraft:river and Minecraft:frozen river, Minecraft:snowy beach, Minecraft:stony shore, all ocean variants, all Minecraft:cave biomes, all biomes in Minecraft:the End dimension, and Minecraft:the void biome.

Biome-specific creature spawns
Mob Group size Weight Biome Conditions Chance Variant chances
Template:EntityLink 1-2 6 Template:BiomeLink on Minecraft:grass blocks, Minecraft:coarse dirt, Minecraft:red sand, or any Minecraft:terracotta variants that naturally occur in Minecraft:badlands
Template:BiomeLink
Template:BiomeLink
2-3 10 Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:EntityLink 1 1 Template:BiomeLink on any Minecraft:sand blocks
Template:EntityLink 4 10 Farm animal biomes<ref name="farm animal biomes" group="A">"Farm animals" spawn with the same group sizes and weights across the following biomes: </ref>
Template:EntityLink 4 8 Farm animal biomes<ref name="farm animal biomes" group="A" />
Template:EntityLink 1 1 Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
1-2 1 Template:BiomeLink
1-3 1 Template:BiomeLink
Template:BiomeLink
Template:EntityLink 2-4 4 Template:BiomeLink on grass blocks, Minecraft:snow, Minecraft:snow blocks, Minecraft:podzol, or coarse dirt
8 Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:EntityLink 2-5 10 Template:BiomeLink on grass blocks, Minecraft:mud, Minecraft:mangrove roots, Minecraft:muddy mangrove roots
Template:BiomeLink
Template:EntityLink 1-3 10 Template:BiomeLink on grass blocks, Minecraft:stone, snow, snow blocks, Minecraft:packed ice, or Minecraft:gravel Normal Goat 98% Screaming Goat 2%
Template:BiomeLink Normal Goat 98% Screaming Goat 2%
Template:BiomeLink Normal Goat 98% Screaming Goat 2%
Template:EntityLink 2-6 1 Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
5 Template:BiomeLink
Template:BiomeLink
Template:EntityLink 4 8 Template:BiomeLink
4-6 5 Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:EntityLink 4 8 Template:BiomeLink on Minecraft:mycelium
Template:EntityLink 1-2 1 Template:BiomeLink Normal Panda
80 Template:BiomeLink Normal Panda
Template:EntityLink 1-2 1 Template:BiomeLink on grass blocks, any Minecraft:leaves, or any Minecraft:logs.
Template:BiomeLink
Template:EntityLink 1-2 1 Template:BiomeLink
4 10 Farm animal biomes<ref name="farm animal biomes" group="A" />
Template:EntityLink 1-2 1 Template:BiomeLink only on regular Minecraft:ice
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:EntityLink 2-3 4 Template:BiomeLink on grass blocks, snow, snow blocks, or regular Minecraft:sand
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
8 Template:BiomeLink
10 Template:BiomeLink
Template:BiomeLink
12 Template:BiomeLink
2-6 2 Template:BiomeLink
Template:BiomeLink
Template:EntityLink 2-4 2 Template:BiomeLink Adult White Sheep 77.7442% Adult Black Sheep 4.75%

Adult Gray Sheep 4.75%

Adult Light Gray Sheep 4.75%

Adult Brown Sheep 2.85%

Adult Pink Sheep 0.1558%

White Lamb 4.0918%

Black Lamb 0.25%

Gray Lamb 0.25%

Light Gray Lamb 0.25%

Brown Lamb 0.15%

Pink Lamb 0.0082%

Template:BiomeLink Adult White Sheep 77.7442% Adult Black Sheep 4.75%

Adult Gray Sheep 4.75%

Adult Light Gray Sheep 4.75%

Adult Brown Sheep 2.85%

Adult Pink Sheep 0.1558%

White Lamb 4.0918%

Black Lamb 0.25%

Brown Lamb 0.15%

Pink Lamb 0.0082%

4 12 Farm animal biomes<ref name="farm animal biomes" group="A" /> Adult White Sheep 77.7442% Adult Black Sheep 4.75%

Adult Gray Sheep 4.75%

Adult Light Gray Sheep 4.75%

Adult Brown Sheep 2.85%

Adult Pink Sheep 0.1558%

White Lamb 4.0918%

Black Lamb 0.25%

Brown Lamb 0.15%

Pink Lamb 0.0082%

Template:EntityLink<ref group="A">While striders are configured for natural spawning and will do so as part of the regular spawn cycle, they cannot be generated as part of chunks, since the top block of any chunk in the Minecraft:Nether is the Minecraft:bedrock roof.</ref> 1-2 60 Template:BiomeLink in Minecraft:lava sources with air above, at any light level
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:EntityLink 2-5 5 Template:BiomeLink on any sand less than four blocks above sea level None
Template:EntityLink 1 1 Template:BiomeLink on grass blocks, snow, snow blocks, coarse dirt, or podzol
2-4 8 Template:BiomeLink
4 5 Template:BiomeLink
8 Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
Template:BiomeLink
4-8 2 Template:BiomeLink
8 Template:BiomeLink

<references group="A" />


Mob spawning on structure generation

When certain structures are generated, they may also spawn various mobs at specific locations within the structure. These mobs will not despawn on their own, even if their regularly spawned versions would. The only exception is that hostile mobs still despawn if the game Minecraft:difficulty is set to "Peaceful". This type of mob generation is not to be confused with the special set of mobs that can spawn in certain structures during the regular spawn cycle.

The following structures generate with mobs:

Spawn cycle

Java Edition

Mobs are broadly divided into seven categories: hostile, passive, water creature (Minecraft:squid, Minecraft:dolphins, and Minecraft:nautiluses), underground water creature (Minecraft:glow squid), axolotls, water ambient (all 4 types of Minecraft:fish), and ambient (Minecraft:bat). Most mobs have a spawning cycle once every game Minecraft:tick (Template:Frac of a second), but passive mobs have only one spawning cycle every Template:Convert. Because of this, where conditions permit, hostile mobs spawn frequently, but passive mobs (animals) spawn rarely. Most animals spawn within chunks when they are generated.

Mobs spawn naturally within chunks that have a player horizontally within 128 blocks of the Minecraft:chunk center, and can only spawn within a 128 block radius sphere centered on the player. When there are multiple players, mobs can spawn within the given distance of any of them. Hostile mobs (and some others) that move farther than 128 blocks from the nearest player despawn instantly.

Java Edition mob cap

There are two caps, a global cap and a per-player cap. Note the spawn density mechanism may also be considered a "cap" of sorts, but takes effect later in the spawning process.

The mob caps are checked once for each spawn-eligible chunk. Spawn for the chunk may take the total number of mobs over the cap.

The caps for each mob category are as follows:

Mob category Cap
Monster 70
Creature 10
Ambient 15
Axolotls 5
Underground water creature 5
Water creature 5
Water ambient 20
Misc -1

The entities included in each mob cap are as follows:

Cap Entities
Minecraft:Monster
Creature
Ambient
Axolotls
Underground water creature
Water creature
Water ambient
Misc

The "misc" category is used only by entities that are not mobs, do not spawn naturally, and/or following different spawning rules than other mobs. As such the mob cap has no bearing on mobs of this category. The global mob cap affects only environmental mob spawning, and does not affect mobs spawned through breeding, spawn eggs, the Template:Cmd command, monster spawners, or any other type of mob spawning.

Global mob cap

All non-persistent loaded mobs are counted against the global cap, including those in chunks not in range of a player or eligible for spawns. The cap is scaled by the total number of chunks within a 17×17 chunk square around any player. The cap is then scaled as globalCap = mobCap × chunks ÷ 289. Because chunks that are in the range of multiple players are counted once, more chunks and higher mob caps result from the players spreading out.

Per-player mob cap

Each non-persistent mob in a chunk that has its center within 128 blocks horizontally of a player is counted toward that player's per-player mob cap. For each chunk, spawns are only allowed if at least one player has that chunk in range and has not reached their per-player mob cap.

Pack spawning

File:Spawning science.jpg
Example of a mob pack spawning. The mob spawning area is shaded blue. 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. The red cube is the center of the pack.
File:Spawning requirements.png
Requirements for the spawning location of individual mobs. Top slabs, upside-down stairsTemplate:Only etc. count as opaque block.

For each spawning cycle, attempts are made to spawn packs of mobs per each eligible chunk. An eligible chunk is determined by the same check for which chunks are Minecraft:random ticked. A random location in the chunk is chosen to be the center point of the pack. The X and Z coordinates are chosen completely at random, while the Y coordinate is a random coordinate between the block above the highest block in the column and -64. This makes lower maximum elevations a strong way to increase spawn rates and is the reason why perimeters are so effective. If the block in which a pack spawn occurs is an opaque full cube, further pack spawn attempts are canceled. There are a maximum of 3 pack spawn attempts per mob category.

Before the attempt to spawn each mob in the pack, the position is offset by ±5 (triangular distribution) on the X and Z axes. Thus, while the pack can be spread out up to 40 blocks from the initial position for a pack size of 4, it's much more likely they'll be closer to the center. Approximately 85% of spawns are within 5 blocks of the pack center, and 99% within 10 blocks of the center. Mobs spawn with the lowest part of their body inside this area.

All mobs within a pack are the same species. The species for the entire pack is chosen randomly, but based on a weight system from those eligible to spawn at the location of the first spawn attempt in the pack. For later mob spawn attempts in the pack, if the selected species cannot spawn at the location (e.g. due to being in a different biome or structure) then that attempt fails.

The game checks on each spawn if the number of mobs that have been spawned for the pack is equal to the max spawn attempts, as well as the location's spawn potential.

Pack spawn size

Pack spawn attempts max out at:

  • 8 wolves, cod, and tropical fish
  • 6 horses and donkeys
  • 4 for any other mob

When the max pack size is less than the number of possible spawn attempts, some spawns attempts fail, but are seen more commonly in practice. Based on the number of mobs that have been successfully spawned, if the max pack size is greater than the number of spawn attempts, one gets only the number of spawns from the spawn attempts. Some mobs have a minimum and max pack size, meaning there is an even chance for any number of spawn attempts between them occurring.

Pack spawn location

For all dimensions, structure-based spawns take priority over biome for hostile spawns. This means that in a Minecraft:swamp hut, Minecraft:pillager outpost, Minecraft:Nether fortress (outer bounding box only when there is Minecraft:Nether bricks below itTemplate:Only), and Minecraft:ocean monument, one sees only the corresponding hostile mobs for that structure within that structure.

In the Minecraft:Overworld, this depends on the location:

In Minecraft:the Nether:

Spawn conditions

Whether a spawn condition fails differs from the above determination if the game tries to spawn them in that biome. For example, dolphins can have pack spawns that occur inside of frozen ocean and deep frozen ocean biomes, but no other biomes. These rules apply to variants of the same mob, such as baby zombies and jockeys.

Each individual spawn attempt succeeds only if all of the following conditions are met:

  • There must be no players or the world spawn point within a 24 block radius (spherical) of the spawning block.
  • The number of loaded mobs of that type must be less than the mob cap for that type (I.e. the corresponding mob cap must not be full).
  • The mob's collision box upon spawning must not collide with another collision box. A mob cannot spawn inside of anything that would collide with it upon spawning.
  • The mob's collision box must not intersect with a solid block.
  • For all mob types excluding passives and fish, spawns fail unless within a 128 radius block sphere around the player. For fish, spawns fail unless within a 64 block radius of the player.<ref name="20w10a">Template:Snap</ref>
  • Template:Cmd is true.
  • For non-aquatic mobs, the following conditions must be satisfied for the block above the spawning surface:
Hostile mobs

Regarding a Minecraft:light level, the basic rules for spawning are as follows (compare it with Template:Slink):

  • In the Overworld, if the Minecraft:internal sky light level is 7 or less (which always occurs inside a cave) and the block level is 0, all Overworld monsters can spawn. On the surface of the Overworld this occurs for 8 minutes of the 20 minutes. Each Monster has slightly different conditions for spawning though, so check out Minecraft:Light#Mobs
  • In the Nether, if the block light level is 7 or less, all Nether monsters can spawn. Sky light is always 0 in the Nether.
  • In the End, block light level must be 0. Sky light is similar to the Overworld in The End: 15 on the surface and lower light levels under solid blocks.

For more specific rules check Minecraft:Light#Effects_of_light.

When doing the light check in the Overworld and End, the spawn chances are randomized and a spawn only occurs if the light level is less than or equal to a random number between 0 and 7. In the Nether, as long as the light level is 11 or below, the spawn is allowed.

Some mobs have some additional rules in addition to the ones above.

Mob Rules
Template:EntityLink
  • Spawns only in nether fortresses.
Template:EntityLink
  • Spawning block and block below must be water.
  • In rivers, has Template:Frac chance to spawn.
  • In oceans, has Template:Frac chance to spawn and must be 5 block below sea level.
Template:EntityLink
  • 95% chance of spawn failure.
Template:EntityLink
  • The spawning block and the block below must be water, including waterlogged blocks and bubble columns.
  • 95% chance of failure if the spawning block has sky exposure (details).
Template:EntityLink
  • Cannot spawn on nether wart block.
Template:EntityLink
  • The location of the spawn must have sky access.
Template:EntityLink
  • Cannot spawn on liquid.
Template:EntityLink
  • Spawn has a Template:Frac chance of failure.
  • Can spawn on leaves.
Template:EntityLink
  • Cannot spawn on nether wart block.
Template:EntityLink (nether fortress)
Template:EntityLink (swamp biome)
  • 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.
  • 50% chance of failure.
Template:EntityLink (slime chunks)
  • the spawning block is below level 40.
  • 90% chance of failure.
Template:EntityLink
  • The location of the spawn must have sky access.
Template:EntityLink
  • Spawns only in nether fortresses.
Template:EntityLink
  • Spawns only in grass blocks.
Template:EntityLink
  • Cannot spawn on nether wart block.
Passive mobs
  • The mob's collision box must not collide with any liquid.
  • The spawning block must have a light level of 9 or greater.
  • The block directly below the spawning block must be one associated to the mob, as per the table below :
Mob Spawning Blocks
Template:EntityLink

Template:BlockLink

Template:EntityLink

Template:BlockLink

  • the spawning block<ref name="spawning block position"> that is, the block situated one block above the floor block the mob will spawn onto </ref> must be y-level 66 or lower.
Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink

Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink<ref name="snow"> only 8 levels, since only blocks with solid top surfaces are spawnable. See Template:Bug.</ref>

Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink<ref name="snow" />

Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink<ref name="snow" />

Template:EntityLink

Template:BlockLink
Template:BlockLink

Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink<ref name="snow" />

Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink

Template:EntityLink

Template:BlockLink
Template:BlockLink
Template:BlockLink
Template:BlockLink

Template:EntityLink

Template:BlockLink

Template:BlockLink

any other passive mob in this category

Template:BlockLink

  • Minecraft:Striders ignore the precedent requirements. Strider spawning attempts with lava above check upward as long as there is still lava for if they can successfully spawn in a lava block with air on top.
Aquatic mobs
  • The spawning block must be water.

The mobs have some additional rules in addition to the one above.

Mob Rules

Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink

  • the block directly below the spawning block must be water.
  • the block directly above the spawning block must be water and cannot be waterlogged.
  • the spawning block must be between level 50 and 63, inclusive. This does not apply to Minecraft:tropical fish spawning in lush caves.
Template:EntityLink
  • the light level must be 0.
  • the spawning block must be level 30 or lower.
Template:EntityLink
  • the block directly above the spawning block must not be a solid block.
  • the block directly below the spawning block must be Minecraft:clay.
Ambient mobs
  • The mob's collision box must not collide with any liquid.

The Minecraft:bat is currently the only mob in this category, which has some additional rules in addition to the one above.

Mob Rules
Template:EntityLink
Spawn costs
File:Spawning potential as visualized with minecraft.png
Locations that do not have spawning potential reliant spawns are marked by wart blocks or netherrack.

The Minecraft:warped forest and Minecraft:soul sand valley biomes introduced a new mechanic to limit the amount of mobs that naturally spawn in them. The spawn cost (also called spawn potential or spawn density) takes on a value for each block in the biome. Certain mobs increase that value by some number ("charge") divided by their distance to the block. If a new spawn attempt would bring the "potential" of the spawning block above a certain threshold, the spawn attempt is canceled. This results in mobs not spawning too close to one another in these biomes, and new spawns in the area are completely blocked long before the full mobcap of 70 hostile mobs is ever reached.

More specifically, a mob may be spawned at a location if sum( existing mob's charge ÷ distance to mob ) × new mob's charge < new mob's maximum potential. While the code allows for different mobs to have different charges and maximum potential, all checked mobs have the same charge and maximum potential within both the Minecraft:warped forest and the Minecraft:soul sand valley.

Which mobs contribute to the charge, how much they add, and what the maximum potential is are all biome-specific. Mobs carry charge according to their current biome, and affect spawning in an adjacent biome even if they would not contribute a charge if in that biome. For example, striders in a soul sand valley affect enderman spawns in an adjacent warped forest, even though striders in the warped forest itself do not.

Due to the limited total number of mobs in soul sand valleys and warped forests, a larger-than-usual amount of mobs spawn in any space outside of these biomes, including in nether fortresses.

Notes
  • Buildings surrounded by air 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.
  • 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

Environmental spawning Template:In shares broad similarities to natural spawning in Minecraft:Java Edition: Mobs spawn in a radius around the player subject to block conditions, lighting conditions, biome conditions, naturally generated structure conditions, and caps. Many mobs spawn in groups (called "packs" in Java and "herds" in Bedrock). One notable difference from Java Edition is that most animals can spawn at light level 7 or higher rather than 9 or higher.

There are two types of environmental spawns: cluster spawns and structure spawns. Structure spawns reproduce specific types of mobs at specific locations within certain naturally generated structures, such as nether fortresses, swamp huts, etc. Cluster spawns account for all other types of environmental spawns, including mobs that spawn individually (i.e. not in a herd of 2 or more). Both types of environmental spawns follow the same rules for spawn conditions and mob caps, except that structure spawns can exceed the monster population cap by 1 (see below).

Mob spawning in Bedrock Edition happens within a spherical shell 24-44 blocks away from the player on Minecraft:simulation distance 4. It happens in a quasi-spherical shell 24-128 blocks away from the player, restricted by a simulation distance and/or to roughly 96 blocks horizontally, on simulation distances 6 and higher. This means that mobs can spawn directly above or below the player (for example, phantoms in the sky or zombies underground). Mobs can only spawn in chunks that are being ticked. There is a Template:Frac chance of the mob spawning algorithm attempting to run per chunk, per tick.

Bedrock Edition mob cap

There are three mob caps that affect environmental spawning: a global mob cap, population control caps for general mob types, and density caps for specific mob types. The global mob cap is set at 200 regardless of difficulty. The global mob cap affects only environmental mob spawning, and does not affect mobs spawned through Minecraft:breeding, Minecraft:spawn eggs, the Template:Cmd command, Minecraft:monster spawners, or any other type of mob spawning. Chickens created by thrown or dispensed eggs are counted in the global mob cap. Only mobs that have spawn rules count toward the global cap (i.e. armor stands and minecarts do not take up cap space). In addition, mobs that are within ticking areas (both those around players and those set manually using the Template:Cmd command) count toward the global mob cap; mobs not ticked do not count toward the global mob cap.

The population control caps limit how many mobs of each type and category can spawn within a 9 chunk by 9 chunk square region surrounding the chunk in which the spawn attempt is made. Mobs in chunks outside a ticking area still count toward population control counts as long as they were previously loaded (i.e. within Minecraft:simulation distance at some time) after relogging. The population control caps are split up into two distinct categories: a cap for surface mobs, and a cap for cave mobs. Cave mobs do not count toward the surface mob cap, and surface mobs do not count toward the cave mob cap. Whether a mob counts as a surface mob or a cave mob is determined by where or how it spawned, not where it happens to be at the moment. For cluster spawns, those that spawn on the highest spawnable block at a given coordinate count toward the surface cap, and any that spawn below the highest solid or non-solid but spawnable (e.g. ice or upper slab with air above) block count toward the cave cap. Structure-spawned mobs and converted mobs (i.e. drowned converted from zombies, witches from villagers, zombified piglins from pigs, and medium and small slimes from killed larger slimes) always count toward the cave cap, and monster-spawner-spawned mobs always count toward the surface cap.

There are five categories of mobs: ambient, animal, monster, pillager, and water_animal. The population control cap for each category and location of mob in each dimension is as follows (* denotes values that are coded in the game but not actually used by any mobs):

Population control caps
Category Location Overworld Nether The End
Ambient Surface 0 0 0
Cave 2 0 2*
Animal Surface 4 0 4*
Cave 0 4 0
Monster Surface 8 0 10
Cave 16 16 8*
Pillager Surface 8 0 8*
Cave 8 0 8*
Water_Animal Surface 36 0 36*
Cave 0 0 0

The entities included in each population control caps are as follows:

Population Control Entities
Ambient
Minecraft:Animal
Cat
Minecraft:Monster
Pillager
Water Animal

Some specific mobs types also have their own density caps. The density caps limit the number of those mobs to some amount below the applicable population control cap. Density caps are checked in the same manner as the population control caps. Caps are below (n/a indicates that the mob does not spawn in that environment at all).

Mob density caps
Mob Surface cap Cave cap
Template:EntityLink 20 n/a
Template:EntityLink 5 unlimited (population control cap still applies)
Template:EntityLink 5 n/a
Template:EntityLink 5 in ocean

2 in river

n/a
Template:EntityLink n/a 2
Template:EntityLink 5 n/a
Template:EntityLink 3 n/a
Template:EntityLink 10 in ocean

4 in river

n/a
Template:EntityLink 4 in ocean

2 in river

n/a
Template:EntityLink 20 for preset pattern

20 for random pattern

n/a

Bedrock spawn conditions

Template:See alsoThe following rules apply to most mobs:

  • Mobs spawn at a distance from the player that depends on the world's Minecraft:simulation distance:
    • Simulation distance 4: between 24 and 44 blocks spherical radius from the player.
    • Simulation distance 6 and up: between 24 and 128 blocks spherical radius from the player, but limited horizontally by simulation distance and coding that restricts the spawning algorithm from running in chunks whose center exceeds 96 blocks from the player.<ref>The 96-block horizontal limit is reported as a bug at MCPE-102197</ref>
  • The bottom part of the mob (i.e. the feet of a standing mob) can spawn only in an air block, or for water mobs in a water block. A few naturally-generated, non-motion-blocking blocks such as grass and flowers are ignored for this rule. If the mob spawns in a flower the block above the flower must be air.
  • The bounding box of the mob must not intersect any solid blocks. Mobs can spawn intersecting leaves, glass, and other transparent blocks.
  • There must be a block with a full, solid top surface under the spawn location for the mob to spawn on. (I.e. mobs cannot spawn on carpets, lower slabs, fences, right-side-up stairs, upside-down stairsTemplate:Only, redstone repeaters, chests, etc.)
  • Mobs cannot spawn on transparent full blocks like glass and leaves.Template:Verify
  • For mobs that can spawn floating in water or flying in air, the block that is checked for spawning is the water or air block immediately above the first solid top surface block below the spot where the mob would spawn. (So for example, phantoms cannot spawn over a field covered in carpet, and fish cannot spawn in an ocean where bottom slabs cover the ocean floor.)
  • Most Overworld monsters cannot spawn if the sky light level is greater than or equal to 7 or the block light level is greater than 0.
  • Most Overworld animals cannot spawn if the (combined) light level is less than 7.

Cluster spawning

Cluster spawning happens in two stages: first attempt to spawn surface mobs, then attempt to spawn cave mobs. Before spawning, the population control cap is calculated based on the 9 chunks × 9 chunks 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 downward for a solid-top-surface block with a non-spawn-blocking block above it. The first such block that is found is considered to be the surface, and the algorithm attempts to spawn a surface mob herd. However, if the algorithm finds a solid block before finding a spawnable solid-top-block (e.g. if it finds a tree trunk directly under leaves), it does not make any surface spawn attempt. The algorithm then continues to search downward for the next suitable block with a non-spawn-blocking block above it. When a block meeting the criteria is found, the algorithm attempts to spawn a cave mob herd at that block location. Cave spawn attempts continue until the Y coordinate reaches the world bottom, and do not stop even if a cave herd was spawned.

Surface and cave cluster 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 7 or higher, there are 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 herd. Each mob can have its own min and max herd size, and the herd size can depend on difficulty and biome.
  3. Make sure the spawn location has suitable spawn conditions.
  4. Limit the number of mobs spawning based on the global mob cap. No mobs spawn if the mob count already meets or exceeds the mob cap.
  5. For each mob to spawn, check that spawning it would not exceed the population control cap or mob density cap.
    • If spawning the mob would not exceed the population control or mob density caps, then the probability of a mob spawning 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.

Structure spawning

Structure spawn attempts occur at specific relative X and Z coordinates in naturally generated structures, known as "hard-coded spawn spots". The structures that have hard-coded spawn spots include swamp huts, ocean monuments, pillager outposts, and nether fortresses. Whenever a successful cluster spawn attempt occurs within a chunk that contains a hard-coded spawn spot, the environmental spawning algorithm also attempts a structure spawn. (Note that a "successful attempt" here means that a spawnable block was found, even if the spawn was then blocked by light level check or mob cap check.) The structure spawn attempt follows the same rules and steps described above for cluster spawning, with the following changes:

  • Instead of starting at world height and searching down to bedrock at the specific X and Z location, the search begins and ends at a specific Y values determined by the type of structure. Structure spawn attempts occur only on the first spawnable block found (i.e. the highest spawnable block) within that range.
  • The mob picked depends on the structure: swamp huts spawn witches, ocean monuments spawn guardians, pillager outposts spawn pillagers (including patrol captains), and nether fortresses spawn skeletons, wither skeletons, blazes, and magma cubes.
  • The population control caps are effectively 1 higher for structure spawn attempts.

Other types of spawning

General

  • In Minecraft:Creative or via a dispenser, the player can use Minecraft: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 (though monsters other than shulkers and the ender dragon still cannot be spawned in peaceful).
  • Any Minecraft:entity can be spawned using the Template:Cmd command.
  • A rider mob can be spawned on a mob, or a ride can be spawned for a mob using Template:Cmd Template:In, provided that both mobs allow riding.

Passive mobs

Mob Spawning
Template:EntityLink An agent spawns when using a code connection.Template:Only
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Spawn when using the corresponding Minecraft:bucket of aquatic mob.
Template:EntityLink Spawn when a Minecraft:bee nest or beehive is broken without Minecraft:Silk Touch.
Template:EntityLink Spawns in the vicinity of a player near a village.
Template:EntityLink A thrown Minecraft:egg spawns baby chickens.
Template:EntityLink
Template:EntityLink
Template:EntityLink
Can be made to spawn if a player builds the proper structure out of blocks. They can also be created by an enderman. Copper golems can also spawn when scraping a non-waxed, non-oxidized Minecraft:copper golem statue.
Template:EntityLink (brown) Spawns when a Minecraft:red mooshroom is struck by lightning, and vice-versa.
Template:EntityLink Spawn when breeding a horse and a donkey.
Template:EntityLink Are part of Tutorial Worlds.Template:Only
Template:EntityLink Can spawn during thunderstorms, trigger a skeleton trap.
Template:EntityLink Minecraft:Sniffer eggs hatch and spawn snifflets.
Template:EntityLink Minecraft:Turtle eggs hatch and spawn baby turtles.
Template:EntityLink Hydrated Minecraft:dried ghasts spawn ghastlings.

Hostile mobs

Mob Spawning
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
A Minecraft:monster spawner causes mobs to spawn constantly in the area around it.
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink (baby)
A Minecraft:trial spawner or Minecraft:ominous trial spawner causes their respective mob to spawn during a normal Trial or an Minecraft:ominous trial.
Template:EntityLink (charged) If a Minecraft:creeper gets struck by Minecraft:lightning, it becomes charged.
Template:EntityLink A Minecraft:creaking heart found in the Minecraft:pale garden needs to be placed by 2 correctly orientated pale oak logs. When met these conditions, they will activate and spawn a creaking during the night.
Template:EntityLink Can spawn randomly when a player uses an Minecraft:ender pearl.
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Template:EntityLink
Can spawn as part of Minecraft:raids or Minecraft:patrols.
Template:EntityLink Can spawn after player does not sleep or die for at least 3 days. (Template:IN phantoms are spawned by the environmental spawning algorithm like other monsters. They are subject to the monster cap, and they count toward the monster cap).
Template:EntityLink
Template:EntityLink
Killing medium and large Minecraft:slimes or Minecraft:magma cubes spawns 2-4 more, but in a smaller size.
Template:EntityLink (effect) Entities with the Minecraft:status effect Minecraft:Infested have a 10% chance to spawn 1-2 silverfish when hurt.
Template:EntityLink (block) An Minecraft:infested block spawns a silverfish if broken, or if a nearby silverfish is attacked.
Template:EntityLink Entities with the Minecraft:status effect Minecraft:Oozing will spawn 2 medium slimes on Minecraft:death.
Template:EntityLink Skeletons spawn as 20% of naturally-spawning strays
Can also spawn from skeleton traps.
Template:EntityLink When a player activates a naturally generated sculk shrieker four times or more.
Template:EntityLink When a Minecraft:villager gets struck by lightning, it is replaced by a newly spawned Minecraft:witch.
Template:EntityLink Can be made to spawn if a player builds the proper structure out of blocks.
Template:EntityLink Zombies spawn as 20% of naturally-spawning husks.Template:Only
Template:EntityLink
Template:EntityLink
Template:EntityLink
Can spawn reinforcement when hurt.Template:Only
Template:EntityLink Zombie villagers spawn as 5% of naturally-spawning zombies.

A villager killed by a zombie has a 50% chance of becoming a zombie villager in normal difficulty, and 100% chance in hard difficulty.

Template:EntityLink Can spawn from Minecraft:nether portals in the Overworld. Lighting and player proximity don't prevent this.

When a Minecraft:pig gets struck by Minecraft:lightning, it is replaced by a newly spawned Minecraft:zombified piglin.

Template:EntityLink
Template:EntityLink
If a Minecraft:piglin or Minecraft:hoglin is transported to the Minecraft:Overworld or Minecraft:the End, after 15 seconds they transform into Minecraft:zombified piglins or Minecraft:zoglins, respectively.

Despawning

Template:Redirect

Java Edition

File:Mob spawning ranges.png
Various mob spawning ranges, illustrated.

All monster, ambient, and aquatic mobs excluding Minecraft:shulkers, Minecraft:withers, Minecraft:elder guardians, and Minecraft:ender dragons despawn unless they have been marked persistent. Other mobs that are not hostile, ambient, or aquatic that do despawn include Minecraft:ocelots, stray Minecraft:cats, Minecraft:wandering traders, and untamed Minecraft:trader llamas.

  • A mob that has had no player within 32 blocks of it for more than 30 seconds, or 10 seconds if in high light levels (over 12) for monsters, has a Template:Frac chance of despawning on each game Minecraft:tick (Template:Frac of a second), which is a 2.47% chance per second. Therefore, the mob population declines so that half remains after 27.75 seconds, and the average lifetime of monsters not within 32 blocks of a player is 40 seconds (after the initial 30 seconds have elapsed). The game uses an inactivity counter to tell whether a mob should be despawned or not.
  • Mobs other than fish despawn immediately if no player is within 128 blocks of it, while fish despawn if no player is within 64 blocks.<ref name="20w10a" />
    • This is a Euclidean sphere, not a cylinder from map top to bottom and not a taxicab sphere (an octahedron). Example: A mob at 0/y/0 remains at least 10 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 Minecraft:chunk the mob is in must still be loaded for the mob to despawn. Otherwise, the mob is saved until the chunk is loaded again. For example, if a player enters a Minecraft:nether portal while being chased by a spider, the spider is saved, and it resumes chasing the player coming back through the same portal. In the case of a player reloading chunks, the loading happens before the player is added, meaning they may despawn.
  • All mobs (including persistent mobs) despawn immediately at Y=-128 and below.
  • Ocelots and most monster mobs (including those that are holding items) despawn if the difficulty is set to Minecraft:Peaceful, regardless of where the player is located. Monster mobs that do not despawn include hoglins, piglins, and shulkers in all editions.
  • For despawning to occur, there must be at least one non-spectator player in the dimension.
  • Chickens that originally spawned as Minecraft:chicken jockeys follow zombie despawn rules, rather than chicken despawn rules.
  • Wandering traders and trader llamas despawn after 40-60 minutes (2-3 in game days). They also despawn sooner if all the trades are locked.Template:OnlyTemplate:Verify
  • Endermites despawn after 2 minutes unless named with a name tag or have persistent tag.
  • Wardens despawn after 1 minute if they couldn't detect a vibration or smell by any mob or player.

Template:Anchor Mobs are persistent, meaning they do not despawn and do not count toward the respective mob caps, when they:

The following mobs have their despawning preventedTemplate:Info needed, and do not count towards their respective mob caps:

Bedrock Edition

Template:IN, like Java, despawning occurs based on distance and chance.

  • On simulation distances 6 and higher, almost all environmentally spawned mobs immediately despawn when they are either (1) in a chunk at the edge of the simulation distance (technically, a chunk not fully surrounded by 8 chunks that were simulated on the last game tick), or (2) more than 128 blocks from the nearest player.
  • On simulation distance 4, mobs immediately despawn when they are more than 44 blocks from the nearest player.
  • Minecraft:Fish despawn at a shorter distance, when they are more than 40 blocks from the nearest player on all simulation distances.
  • Mobs more than 32 blocks from the nearest player have a 1 in 800 chance to despawn on each game tick if they have not taken damage for 30 seconds.
  • All mobs (including persistent mobs) despawn immediately at Y=-128 and below.

Mobs with persistence do not despawn. Mobs gain persistence in the following ways:

The following entities always have persistence: Template:Columns-list

History

Template:Missing info

Java Edition

Template:HistoryTable

Legacy Console Edition

Template:HistoryTable

Issues

Template:Issue list

Trivia

  • In Bedrock Edition, an opaque block normally causes all blocks below it to spawn cave mobs, but not if a transparent block is placed on top.

Notes

Template:Notelist

References

<references/>

External links

Navigation

Template:Navbox gameplay

Minecraft:pt:Geração de criaturas