API reference / @jsprismarine/spawning / Spawner
Class: Spawner
Defined in: spawner.ts:140
Runs the spawn loop for one world.
Constructors
Constructor
new Spawner(
options):Spawner
Defined in: spawner.ts:152
Parameters
options
Returns
Spawner
Accessors
pools
Get Signature
get pools(): readonly
string[]
Defined in: spawner.ts:172
The pools the loaded rules name, which is what tick cycles.
Returns
readonly string[]
Methods
cycle()
cycle(
pool,tick): readonlySpawnRequest[]
Defined in: spawner.ts:196
Runs one cycle of one pool, whatever the cadence says.
Parameters
pool
string
tick
number
Returns
readonly SpawnRequest[]
Every entity to create, never more than the pool's remaining cap.
tick()
tick(
tick): readonlySpawnRequest[]
Defined in: spawner.ts:181
Runs every pool whose cadence falls on this tick.
Parameters
tick
number
Returns
readonly SpawnRequest[]
Every entity to create, in the order the cycles produced them.