Modifier and Type | Method and Description |
---|---|
Dungeon.Builder |
attempts(int attempts)
Sets the number of attempts at randomly spawning a generator per
chunk.
|
Dungeon |
build()
Builds a new instance of a
Dungeon populator with the
settings set within the builder. |
Dungeon.Builder |
itemsQuantity(int count)
Sets the number of items which will spawn per chest.
|
Dungeon.Builder |
maximumNearbyEntities(short count)
Sets the maximum amount of entities that may be within the spawn
range.
|
Dungeon.Builder |
maximumSpawnDelay(short delay)
Sets the maximum delay between batches of monsters.
|
Dungeon.Builder |
minimumSpawnDelay(short delay)
Sets the minimum delay between batches of monsters.
|
Dungeon.Builder |
mobSpawnerData(MobSpawnerData data)
Sets the
MobSpawnerData which represents the MobSpawner which
will be created within the dungeon. |
Dungeon.Builder |
possibleEntities(Collection<WeightedEntity> entities)
Defines a number of
WeightedEntity s from which the type
of each batch will be randomly selected based on the weighting value. |
Dungeon.Builder |
possibleEntities(WeightedEntity... entities)
Defines a number of
WeightedEntity s from which the type
of each batch will be randomly selected based on the weighting value. |
Dungeon.Builder |
possibleItems(Collection<WeightedItem> items)
Defines a number of
WeightedItem s from which items
will be randomly selected based on weight in order to calculate the
contents of chests placed within the dungeon. |
Dungeon.Builder |
possibleItems(WeightedItem... items)
Defines a number of
WeightedItem s from which items
will be randomly selected based on weight in order to calculate the
contents of chests placed within the dungeon. |
Dungeon.Builder |
requiredPlayerRange(short range)
Sets the minimum range to the nearest player before this monster
spawner will activate.
|
Dungeon.Builder |
reset()
Resets this builder to the default values.
|
Dungeon.Builder |
spawnCount(short count)
Sets the number of monsters that will attempt to spawn in each batch.
|
Dungeon.Builder |
spawnRange(short range)
Sets the range within which the monsters from each batch will be
spawned.
|
Dungeon.Builder attempts(int attempts)
attempts
- The new number of attemptsDungeon.Builder mobSpawnerData(MobSpawnerData data)
MobSpawnerData
which represents the MobSpawner which
will be created within the dungeon. Setting this directly will
overwrite the related builder methods.data
- The mob spawner data to useDungeon.Builder minimumSpawnDelay(short delay)
Each time the timer is reset the new delay is chosen randomly from between the minimum (inclusive) and maximum (exclusive) delays.
delay
- The new minimum delay, in ticksDungeon.Builder maximumSpawnDelay(short delay)
Each time the timer is reset the new delay is chosen randomly from between the minimum (inclusive) and maximum (exclusive) delays.
delay
- The new maximum delay, in ticksDungeon.Builder spawnCount(short count)
The actual number of monsters spawned may be less than the attempted amount if the maximum number of entities allowed in the area is reached.
count
- The new countDungeon.Builder maximumNearbyEntities(short count)
count
- The new maximum amount of nearby entitiesDungeon.Builder requiredPlayerRange(short range)
range
- The new required rangeDungeon.Builder spawnRange(short range)
The total region within which the monster may be spawned
is defined by a cuboid with dimensions of
range*2+1 x 3 x range*2+1
centered around the monster
spawner.
range
- The new rangeDungeon.Builder possibleEntities(WeightedEntity... entities)
WeightedEntity
s from which the type
of each batch will be randomly selected based on the weighting value.entities
- The possible entitiesDungeon.Builder possibleEntities(Collection<WeightedEntity> entities)
WeightedEntity
s from which the type
of each batch will be randomly selected based on the weighting value.entities
- The possible entitiesDungeon.Builder possibleItems(WeightedItem... items)
WeightedItem
s from which items
will be randomly selected based on weight in order to calculate the
contents of chests placed within the dungeon.items
- The possible itemsDungeon.Builder possibleItems(Collection<WeightedItem> items)
WeightedItem
s from which items
will be randomly selected based on weight in order to calculate the
contents of chests placed within the dungeon.items
- The possible itemsDungeon.Builder itemsQuantity(int count)
count
- The new item countDungeon.Builder reset()
Dungeon build() throws IllegalStateException
Dungeon
populator with the
settings set within the builder.IllegalStateException
- If there are any settings left unset
which do not have default values