Difference between revisions of "Better Spawner/Spawn Condition"
(Added worlds and seesSky conditions) |
m (Text replacement - "https://minecraft.gamepedia.com" to "https://minecraft.wiki") |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | A | + | A SpawnCondition is the most important component of [[Better_Spawner|the Better Spawner system]], and tells the spawner when and where to spawn entities. |
− | The properties of a | + | If a particular property is not mentioned in the condition, then any value is acceptable. |
+ | |||
+ | The properties of a SpawnCondition are as follows: | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 9: | Line 11: | ||
|- | |- | ||
|style="text-align:center"|<code>"times"</code> | |style="text-align:center"|<code>"times"</code> | ||
− | |style="text-align:center"|List of any of the following: | + | |style="text-align:center"|List of any of the following: <code>"DAWN"</code>,<code>"MORNING"</code>,<code>"DAY"</code>,<code>"MIDDAY"</code>,<code>"AFTERNOON"</code>,<code>"DUSK"</code>,<code>"NIGHT"</code>,<code>"MIDNIGHT"</code>. |
− | |style="text-align:center"|The times of the day that the entity may spawn. | + | |style="text-align:center"|The [[Spawn time|times of the day]] that the entity may spawn. |
|- | |- | ||
|style="text-align:center"|<code>"weathers"</code> | |style="text-align:center"|<code>"weathers"</code> | ||
|style="text-align:center"|List of any of the following: <code>"CLEAR"</code>,<code>"RAIN"</code>,<code>"STORM"</code>. | |style="text-align:center"|List of any of the following: <code>"CLEAR"</code>,<code>"RAIN"</code>,<code>"STORM"</code>. | ||
− | |style="text-align:center"|The weather types which the entity may spawn in. Note that | + | |style="text-align:center"|The weather types which the entity may spawn in. Note that snow will also count as rain (and snowstorms as normal storms). |
|- | |- | ||
|style="text-align:center"|<code>"stringBiomes"</code> | |style="text-align:center"|<code>"stringBiomes"</code> | ||
− | |style="text-align:center"|List of any number of | + | |style="text-align:center"|List of any number of biomes, using their [https://minecraft.wiki/Biome/ID ID name] (such as <code>"redwood_taiga_hills"</code>). |
− | |style="text-align:center"|All the biomes that the entity may spawn in. | + | |style="text-align:center"|All the biomes that the entity may spawn in. Supports modded biomes from mods such as ''Biomes O' Plenty'', and pre-made [[Better Spawner/Categories|categories]] containing multiple biomes to spawn in. |
|- | |- | ||
− | |style="text-align:center"|<code>" | + | |style="text-align:center"|<code>"dimensions"</code> |
− | |style="text-align:center"|List of | + | |style="text-align:center"|List of numbers |
− | |style="text-align:center"|The | + | |style="text-align:center"|The dimensions that the entity may spawn in. Having a list with only <code>0</code>, for example, would make an entity only spawn in the regular overworld. |
|- | |- | ||
|style="text-align:center"|<code>"worlds"</code> | |style="text-align:center"|<code>"worlds"</code> | ||
Line 53: | Line 55: | ||
|- | |- | ||
|style="text-align:center"|<code>"seesSky"</code> | |style="text-align:center"|<code>"seesSky"</code> | ||
− | |style="text-align:center"| | + | |style="text-align:center"|Boolean (true/false) |
|style="text-align:center"|Whether the sky must be visible or must not be visible for the entity to spawn. Not including this option means it does not care whether it can or not. | |style="text-align:center"|Whether the sky must be visible or must not be visible for the entity to spawn. Not including this option means it does not care whether it can or not. | ||
|- | |- | ||
Line 67: | Line 69: | ||
|style="text-align:center"|Integer from 0 to 15 | |style="text-align:center"|Integer from 0 to 15 | ||
|style="text-align:center"|The maximum level of light for the entity to spawn. | |style="text-align:center"|The maximum level of light for the entity to spawn. | ||
+ | |- | ||
+ | |style="text-align:center"|<code>"tag"</code> | ||
+ | |style="text-align:center"|Text | ||
+ | |style="text-align:center"|A needed tag on the [[Better_Spawner/Spawn_Info|SpawnInfo]]. For example, legendary Pokémon often have multiple tags, one of which is <code>legendary</code>. | ||
+ | |- | ||
+ | |style="text-align:center"|<code>"temperature"</code> | ||
+ | |style="text-align:center"|One of any of the following: <code>"OCEAN"</code>, <code>"COLD"</code>, <code>"MEDIUM"</code>, <code>"WARM"</code> | ||
+ | |style="text-align:center"|The temperature category needed for the entity to spawn. These temperature categories are per biome. | ||
+ | |- | ||
+ | |style="text-align:center"|<code>"baseBlocks"</code> | ||
+ | |style="text-align:center"|List of text | ||
+ | |style="text-align:center"|The block IDs that this entity may spawn on. These are things like <code>minecraft:stone</code>, or one of the block [[Better Spawner/Categories|categories]]. This does not support meta values for differentiating, for example, stone from andesite. | ||
+ | |- | ||
+ | |style="text-align:center"|<code>"variant"</code> | ||
+ | |style="text-align:center"|List of text | ||
+ | |style="text-align:center"|The variant names needed for the base block. This is mainly used for Headbutt, and uses things like <code>birch</code>, <code>ebony</code>, and <code>willow</code> in this list to specify what types of logs are acceptable. | ||
+ | |- | ||
+ | |style="text-align:center"|<code>"neededNearbyBlocks"</code> | ||
+ | |style="text-align:center"|List of text | ||
+ | |style="text-align:center"|The block IDs that this entity must have nearby in order to spawn. These are things like <code>minecraft:water</code>, or one of the block [[Better Spawner/Categories|categories]]. This does not support meta values for differentiating, for example, stone from andesite. | ||
+ | |- | ||
+ | |style="text-align:center"|<code>"structures"</code> | ||
+ | |style="text-align:center"|List of text | ||
+ | |style="text-align:center"|The names of the various structures generated through Minecraft and Pixelmon. To be used in conjunction with [[biomes]], the new blockType <code>structure</code>, and the two new [[Spawn locations]] [[Manmade]] and [[Indoors]] to allow structural spawning. | ||
|} | |} | ||
− | Note that | + | Note that all properties of a SpawnCondition are optional. If added as an anticondition to a [[Better_Spawner/Spawn_Info|SpawnInfo]], passing the anticondition will prevent the spawn. For example, an anticondition that specifies <code>"minX"</code> and <code>"maxX"</code> is added to a [[Better_Spawner/Spawn_Info|SpawnInfo]], then the entity will spawn everywhere except for between those two <code>x</code> coordinates. Combining this with a regular condition which has <code>"times": ["DAY"]</code> would result in the entity being unable to spawn within those coordinates during the day. |
+ | |||
+ | Combining conditions and anticonditions can make extremely specific behaviour. |
Latest revision as of 01:26, 25 September 2023
A SpawnCondition is the most important component of the Better Spawner system, and tells the spawner when and where to spawn entities.
If a particular property is not mentioned in the condition, then any value is acceptable.
The properties of a SpawnCondition are as follows:
Property label | Type of value | Description |
---|---|---|
"times"
|
List of any of the following: "DAWN" ,"MORNING" ,"DAY" ,"MIDDAY" ,"AFTERNOON" ,"DUSK" ,"NIGHT" ,"MIDNIGHT" .
|
The times of the day that the entity may spawn. |
"weathers"
|
List of any of the following: "CLEAR" ,"RAIN" ,"STORM" .
|
The weather types which the entity may spawn in. Note that snow will also count as rain (and snowstorms as normal storms). |
"stringBiomes"
|
List of any number of biomes, using their ID name (such as "redwood_taiga_hills" ).
|
All the biomes that the entity may spawn in. Supports modded biomes from mods such as Biomes O' Plenty, and pre-made categories containing multiple biomes to spawn in. |
"dimensions"
|
List of numbers | The dimensions that the entity may spawn in. Having a list with only 0 , for example, would make an entity only spawn in the regular overworld.
|
"worlds"
|
List of text | The names of the worlds in which the entity may spawn. |
"minX"
|
Integer | The smallest x world coordinate that the entity may spawn at. |
"maxX"
|
Integer | The largest x world coordinate that the entity may spawn at. |
"minY"
|
Integer | The smallest y world coordinate that the entity may spawn at. |
"maxY"
|
Integer | The largest y world coordinate that the entity may spawn at. |
"minZ"
|
Integer | The smallest z world coordinate that the entity may spawn at. |
"maxZ"
|
Integer | The largest z world coordinate than the entity may spawn at. |
"seesSky"
|
Boolean (true/false) | Whether the sky must be visible or must not be visible for the entity to spawn. Not including this option means it does not care whether it can or not. |
"moonPhase"
|
Integer from 0 to 7 | The specific moon phase index for the entity to spawn. 0 represents a full moon. |
"minLightLevel"
|
Integer from 0 to 15 | The minimum level of light for the entity to spawn. |
"maxLightLevel"
|
Integer from 0 to 15 | The maximum level of light for the entity to spawn. |
"tag"
|
Text | A needed tag on the SpawnInfo. For example, legendary Pokémon often have multiple tags, one of which is legendary .
|
"temperature"
|
One of any of the following: "OCEAN" , "COLD" , "MEDIUM" , "WARM"
|
The temperature category needed for the entity to spawn. These temperature categories are per biome. |
"baseBlocks"
|
List of text | The block IDs that this entity may spawn on. These are things like minecraft:stone , or one of the block categories. This does not support meta values for differentiating, for example, stone from andesite.
|
"variant"
|
List of text | The variant names needed for the base block. This is mainly used for Headbutt, and uses things like birch , ebony , and willow in this list to specify what types of logs are acceptable.
|
"neededNearbyBlocks"
|
List of text | The block IDs that this entity must have nearby in order to spawn. These are things like minecraft:water , or one of the block categories. This does not support meta values for differentiating, for example, stone from andesite.
|
"structures"
|
List of text | The names of the various structures generated through Minecraft and Pixelmon. To be used in conjunction with biomes, the new blockType structure , and the two new Spawn locations Manmade and Indoors to allow structural spawning.
|
Note that all properties of a SpawnCondition are optional. If added as an anticondition to a SpawnInfo, passing the anticondition will prevent the spawn. For example, an anticondition that specifies "minX"
and "maxX"
is added to a SpawnInfo, then the entity will spawn everywhere except for between those two x
coordinates. Combining this with a regular condition which has "times": ["DAY"]
would result in the entity being unable to spawn within those coordinates during the day.
Combining conditions and anticonditions can make extremely specific behaviour.