Difference between revisions of "Better Spawner/Spawn Condition"
(location types is no longer under this) |
(Update for 6.3) |
||
Line 1: | Line 1: | ||
− | A <code>SpawnCondition</code> is the most important component of the Better Spawner system, and tells the spawner when and where to spawn entities | + | A <code>SpawnCondition</code> 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 <code>SpawnCondition</code> are as follows: | The properties of a <code>SpawnCondition</code> are as follows: | ||
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 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 | + | |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 biomes, using their [https://minecraft.gamepedia.com/Biome/ID ID name] (such as <code>"redwood_taiga_hills"</code>). | |style="text-align:center"|List of any number of biomes, using their [https://minecraft.gamepedia.com/Biome/ID ID name] (such as <code>"redwood_taiga_hills"</code>). | ||
− | |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 | + | |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>"dimensions"</code> | ||
+ | |style="text-align:center"|List of numbers | ||
+ | |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 63: | 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 <code>SpawnInfo</code>. 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. | ||
|} | |} | ||
− | Note that | + | Note that all properties of a <code>SpawnCondition</code> are optional. If added as an <code>anticondition</code> to a <code>SpawnInfo</code>, passing the <code>anticondition</code> will prevent the spawn. For example, an <code>anticondition<code> that specifies <code>minX</code> and <code>maxX</code> is added to a <code>SpawnInfo</code>, then the entity will spawn everywhere except for between those two <code>x</code> coordinates. Combining this with a regular <code>condition</code> 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. |
Revision as of 23:07, 3 June 2018
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" |
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.
|
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.