No edit summary
(Structured 1 property into the list and spawned one reference link)
Line 1: Line 1:
A '''spawn condition''' is used during spawn selection to decide whether a specific SpawnDetail is compatible with the given SpawningContext.
A '''spawn condition''' is used during spawn selection to decide whether a specific SpawnDetail is compatible with the given SpawningContext.


A spawn condition JSON has many common properties that apply to all contexts, and then there are sub-types that apply to specific contexts. For example, a submerged context has information about depth, and so a SubmergedSpawningCondition is required to make a condition that checks that depth value for a spawn. For all values that are left blank or empty, that value is not checked by the condition. For example, an empty biome list means the biome won't affect the spawning and an unset moonPhase means the moon won't affect the spawning.
A [[Spawn_Pool_World|spawn condition JSON]] has many common properties that apply to all contexts, and then there are sub-types that apply to specific contexts. For example, a submerged context has information about depth, and so a SubmergedSpawningCondition is required to make a condition that checks that depth value for a spawn. For all values that are left blank or empty, that value is not checked by the condition. For example, an empty biome list means the biome won't affect the spawning and an unset moonPhase means the moon won't affect the spawning.


{| class="wikitable"
{| class="wikitable"

Revision as of 06:09, 4 March 2024

A spawn condition is used during spawn selection to decide whether a specific SpawnDetail is compatible with the given SpawningContext.

A spawn condition JSON has many common properties that apply to all contexts, and then there are sub-types that apply to specific contexts. For example, a submerged context has information about depth, and so a SubmergedSpawningCondition is required to make a condition that checks that depth value for a spawn. For all values that are left blank or empty, that value is not checked by the condition. For example, an empty biome list means the biome won't affect the spawning and an unset moonPhase means the moon won't affect the spawning.

Property Name Description
dimensions A list of dimension IDs, such as minecraft:overworld or minecraft:the_nether. This is technically called a dimension effect.
biomes A list of biome based conditions. These conditions are all written as text. If the condition starts with a # such as #pokemoncobbled:is_arid, it is understood as a biome tag condition, otherwise checked as a biome ID such as minecraft:forest.
structures A list of structure IDs, such as minecraft:stronghold or minecraft:desert_pyramid. Allows Pokémon to spawn in the chunks of the listed structures.
moonPhase The phase of the moon required for the spawn. This is an integer between 0 and 7 according to the Minecraft Wiki.
canSeeSky Whether or not the spawning context must have a direct route to the sky above it, as a true/false. Fluids do not count as a sky obstruction.
minX The minimum X coordinate that the spawning context may have.
minY The minimum Y coordinate that the spawning context may have.
minZ The minimum Z coordinate that the spawning context may have.
maxX The maximum X coordinate that the spawning context may have.
maxY The maximum Y coordinate that the spawning context may have.
maxZ The maximum Z coordinate that the spawning context may have.
minLight The lowest acceptable light level at the spawning context's location. This is an integer between 0 and 15 inclusive.
maxLight The highest acceptable light level at the spawning context's location. This is an integer between 0 and 15 inclusive.
timeRange The time range that is acceptable. This can either be text for registered time ranges like 'day', 'night', 'morning', or it can be a comma separated list of tick ranges such as '0-1200,2000-3000'. It can also be a combination of both.
isRaining Whether it must be raining or not raining, as a true/false.
isThundering Whether it must be thundering or not thundering, as a true/false. Note that if it's raining regularly, it will not count as thundering. If it is thundering, it will count as both thundering and raining.
labels The required labels on the spawn for it to be acceptable. This can be either a condition that requires all of the specified labels to be met, or just one of them. This is dictated by the labelMode value.
labelMode What kind of check will be applied for the labels. This is either ANY, meaning that any matching label from the condition's label list will suffice, or ALL, which requires every label mentioned in the condition to exist in the spawn.

Area spawning conditions are a sub-type of spawning condition and adds more properties that will apply to all area based spawning contexts (which is all world spawning).

Property Name Description
minWidth The smallest acceptable horizontal space around an area spawning context. Should be used to protect spawns from occurring where they will immediately suffocate and die.
maxWidth The largest acceptable horizontal space around an area spawning context.
minHeight The smallest acceptable amount of vertical space above an area spawning context. Should be used to protect spawns from occurring where they will immediately suffocate and die.
maxHeight The largest acceptable amount of vertical space above an area spawning context.
neededNearbyBlocks A list of block identifiers such as minecraft:cobblestone, at least one of which must be nearby. What counts as nearby is dependent on the config option that dictates how far out it should look.

Grounded spawning conditions are a sub-type of area spawning condition and adds more properties that will apply to the grounded context.

Property Name Description
neededBaseBlocks A list of block identifiers such as minecraft:cobblestone, at least one of which must be the base block that the spawn is occurring on.

Submerged spawning conditions are a sub-type of area spawning condition and adds more properties that will apply to the submerged contexts, those being underlava and underwater.

Property Name Description
minDepth The minimum number of blocks that may be beneath the submerged spawning context.
maxDepth The maximum number of blocks that may be beneath the submerged spawning context.
fluidIsSource Whether or not the fluid block the spawn is occurring in must be a source for the fluid.
fluidBlock The type of fluid it must be spawning in. This is as a translated name, such as water.