public static interface RandomObject.Builder extends ResettableBuilder<RandomObject,RandomObject.Builder>
RandomBlock
populators.Modifier and Type | Method and Description |
---|---|
RandomObject |
build()
Builds a new instance of a
RandomBlock populator with the
settings set within the builder. |
RandomObject.Builder |
height(VariableAmount height)
Sets the height range that the object will be placed within.
|
RandomObject.Builder |
object(PopulatorObject obj)
Sets the
PopulatorObject for the populator to attempt to
place. |
default RandomObject.Builder |
perChunk(int count)
Sets the number of fires to attempt to spawn per chunk, must be
greater than zero.
|
RandomObject.Builder |
perChunk(VariableAmount count)
Sets the number of fires to attempt to spawn per chunk, must be
greater than zero.
|
RandomObject.Builder |
spawnChance(double chance)
Sets the chance of spawning the object for each attempt.
|
from, reset
RandomObject.Builder perChunk(VariableAmount count)
count
- The new number to spawndefault RandomObject.Builder perChunk(int count)
count
- The new number to spawnRandomObject.Builder height(VariableAmount height)
height
- The new height rangeRandomObject.Builder object(PopulatorObject obj)
PopulatorObject
for the populator to attempt to
place.obj
- The new populator objectRandomObject.Builder spawnChance(double chance)
chance
- The new spawn chanceRandomObject build() throws IllegalStateException
RandomBlock
populator with the
settings set within the builder.IllegalStateException
- If there are any settings left unset
which do not have default values