technical:spawnconditions

Spawn Conditions

Spawn Conditions are used by many json configs to decide if they are allowed to be triggered, etc. This includes: mob spawners, mob events and dungeons.

Each type of Spawn Condition has its own properties, some properties are shared mongst different types.

string type

The type of Spawn Condition this is, if the type is not recognised, then it is ignored. Can be one of the listed types below in lowercase with no space, example: “world”, “player”, “event”, “date”, “group”

Anything to do with the world that the Spawner is being triggered in.

array[int] dimensionIds

The dimension IDs that the world must or must not match depending on the list type. Defult empty.

string dimensionListType

How the dimension ID list works. Can be “whitelist” or “blacklist”. Default “blacklist”.

array[string] biomes

The list of biome tags to filter this condition by. Defult empty (ignored).

string biomeTagListType

How the biomes from the biome tags list works. Can be “whitelist” or “blacklist”. Default “whitelist”.

array[string] biomeIds

The list of specific biome ids to filter this condition by. Defult empty (ignored).

string biomeIdListType

How the biomes from the specific biome ids list list works. Can be “whitelist” or “blacklist”. Default “whitelist”.

double worldDayMin

The minimum world days that must have gone by, can accept fractions such as 5.25 for 5 and a quarter days. Default -1 (ignored).

double worldDayMax

The maximum world days that must have gone by, can accept fractions such as 5.25 for 5 and a quarter days. Default -1 (ignored).

double worldDayN

The interval of days this condition is true such as every 7 days. Default -1 (ignored).

int dayTimeMin

The minimum time of the current world day. Default -1 (ignored).

int dayTimeMax

The maximum time of the current world day. Default -1 (ignored).

The weather, can be: “any”, “clear”, “rain”, “storm”, “rainstorm” (raining and thundering) or “notclear” (raining or thundering). Default “any”.

int difficultyMin

The minimum difficulty level. Default -1 (ignored).

int difficultyMax

The maximum difficulty level. Default -1 (ignored).

int moonPhase

The required moon phase. 0 is a full moon. Default -1 (ignored).

Anything to do with the player that is triggering the Spawner or being triggered around. If a Spawn Trigger has no player (currently all Triggers have a player involved somehow) then this condition will always fail.

string username

The username of the player. Default “” (empty, ignored).

int difficultyMin

The minimum local area difficulty level. Default -1 (ignored).

int difficultyMax

The maximum local area difficulty level. Default -1 (ignored).

int levelMin

The minimum experience level of the player. Default -1 (ignored).

int levelMax

The maximum experience level of the player. Default -1 (ignored).

int timeMin

The minimum time that the player has been playing, this is counted by Lycanites Mobs from when a player first ever spawns in. Default -1 (ignored).

int timeMax

The maximum time that the player has been playing, this is counted by Lycanites Mobs from when a player first ever spawns in. Default -1 (ignored).

int lightLevelMin

The minimum light level that the player must be in. Default -1 (ignored).

int lightLevelMax

The maximum light level that the player must be in. Default -1 (ignored).

bool grounded

If true, the player must be on the ground (ignored when false). Default false.

bool notGrounded

If true, the player must not be on the ground (ignored when false). Default false.

bool inWater

If true, the player must be in the water (ignored when false). Default false.

bool notInWater

If true, the player must not be in the water (ignored when false). Default false.

array[string] heldItems

A list of held items held by the player (in either hand) to filter by. You can use this to allow or deny spawners based on what the player is holding such as a specific tool, etc. Use item ids like “minecraft:air”. Default empty.

string heldItemsListType

Determines if the items list is a blacklist or whitelist. Default “whitelist”.

This performs checks on the current Mob Event that is playing, if any.

string eventname

The name of the Mob Event that must be active, this is all lowercase with no space, the same that is used with the “/lm mobevent start” command. Set to “” (empty) if no Mob Event must be playing instead. Required.

int eventTimeMin

The minimum time (in ticks) the event must have been running for. Default -1 (ignored).

int eventTimeMax

The maximum event time (in ticks), after this the condition will fail. Default -1 (ignored).

This performs checks on the IRL (system) date. See the Halloween and Yuletide Spawners for this in action.

int monthMin

The minimum month that is must be. Default -1 (ignored).

int monthMax

The maximum month that is must be. Default -1 (ignored).

int dayMin

The minimum day of the month it must be. Default -1 (ignored).

int dayMax

The maximum day of the month it must be. Default -1 (ignored).

string season

Performs advanced date range checks for seasonal dates such as Easter which varies each years as well as internal dates such as Halloween to be consistent with gift items. Can be “valentines”, “easter”, “midsummer”, “halloween”, “yuletide”/“christmas” or “newyear”. Default “” (Empty string, ignored).

This is a special Spawn Condition that allows you to nest more Spawn Conditions in it for more complex patterns such as if x and y or z.

array[Spawn Condition]

A list of child Conditions that this Condition will check. Default empty.

int conditionsRequired

Determines how many Spawn Conditions must be met. If set to 0 or less then Spawn Conditions all are required. Default 0 (all).

  • technical/spawnconditions.txt
  • Last modified: 2020/02/26 16:39
  • by tehmadtitan