setDelay

getMinSpawnDelay

int getMinSpawnDelay()

The minimum spawn delay amount (in ticks).
This value is used when the spawner resets its delay (for any reason).
It will choose a random number between getMinSpawnDelay()
and getMaxSpawnDelay() for its next getDelay().
Default value is 200 ticks.

Returns:

the minimum spawn delay amount

setMinSpawnDelay

getMaxSpawnDelay

int getMaxSpawnDelay()

The maximum spawn delay amount (in ticks).
This value is used when the spawner resets its delay (for any reason).
It will choose a random number between getMinSpawnDelay()
and getMaxSpawnDelay() for its next getDelay().
This value must be greater than 0 and less than or equal to
getMaxSpawnDelay().
Default value is 800 ticks.

Returns:

the maximum spawn delay amount

setMaxSpawnDelay

void setMaxSpawnDelay​(int delay)

Set the maximum spawn delay amount (in ticks).
This value must be greater than 0, as well as greater than or
equal to getMinSpawnDelay()

getSpawnCount

setSpawnCount

void setSpawnCount​(int spawnCount)

Set how many mobs attempt to spawn.

Parameters:

spawnCount - the new spawn count

getMaxNearbyEntities

int getMaxNearbyEntities()

Set the new maximum amount of similar entities that are allowed to be
within spawning range of this spawner.
If more than the maximum number of entities are within range, the spawner
will not spawn and try again with a new getDelay().
Default value is 16.

Returns:

the maximum number of nearby, similar, entities

setMaxNearbyEntities

void setMaxNearbyEntities​(int maxNearbyEntities)

Set the maximum number of similar entities that are allowed to be within
spawning range of this spawner.
Similar entities are entities that are of the same EntityType

Parameters:

maxNearbyEntities - the maximum number of nearby, similar, entities

getRequiredPlayerRange

int getRequiredPlayerRange()

Get the maximum distance(squared) a player can be in order for this
spawner to be active.
If this value is less than or equal to 0, this spawner is always active
(given that there are players online).
Default value is 16.

Returns:

the maximum distance(squared) a player can be in order for this
spawner to be active.

setRequiredPlayerRange

void setRequiredPlayerRange​(int requiredPlayerRange)

Set the maximum distance (squared) a player can be in order for this
spawner to be active.
Setting this value to less than or equal to 0 will make this spawner
always active (given that there are players online).

Parameters:

requiredPlayerRange - the maximum distance (squared) a player can be
in order for this spawner to be active.

getSpawnRange

int getSpawnRange()

Get the radius around which the spawner will attempt to spawn mobs in.
This area is square, includes the block the spawner is in, and is
centered on the spawner's x,z coordinates - not the spawner itself.
It is 2 blocks high, centered on the spawner's y-coordinate (its bottom);
thus allowing mobs to spawn as high as its top surface and as low
as 1 block below its bottom surface.
Default value is 4.