API reference / @jsprismarine/spawning / SpawnDelays
Class: SpawnDelays
Defined in: conditions.ts:45
The cooldowns minecraft:delay_filter keeps.
The three pillager patrol conditions each name their own identifier, which is how one per-difficulty cooldown exists per world rather than one per condition.
Implements
Constructors
Constructor
new SpawnDelays():
SpawnDelays
Returns
SpawnDelays
Methods
readyAt()
readyAt(
identifier):number|undefined
Defined in: conditions.ts:49
The tick the named cooldown next allows a spawn, or undefined when it has never run.
Parameters
identifier
string
Returns
number | undefined
Implementation of
schedule()
schedule(
identifier,tick):void
Defined in: conditions.ts:54
Sets the tick at which the named cooldown allows the next spawn.
Parameters
identifier
string
tick
number
Returns
void
scheduleFrom()
scheduleFrom(
delay,tick,random):void
Defined in: conditions.ts:59
Draws a delay inside the filter's range and schedules it from tick.
Parameters
delay
tick
number
random
Returns
void