Modifier and Type | Interface and Description |
---|---|
static interface |
RandomObject.Builder
A builder for constructing
RandomBlock populators. |
Modifier and Type | Method and Description |
---|---|
static RandomObject.Builder |
builder()
Creates a new
RandomObject.Builder to build a RandomObject populator. |
VariableAmount |
getAttemptsPerChunk()
Gets the number of fires to attempt to spawn per chunk, must be greater
than zero.
|
VariableAmount |
getHeightRange()
Gets the height range that the object will be placed within.
|
PopulatorObject |
getObject()
Gets the
PopulatorObject that this populator will attempt to
place. |
double |
getSpawnChance()
Gets the chance of spawning the object for each attempt.
|
default void |
setAttemptsPerChunk(int count)
Sets the number of fires to attempt to spawn per chunk, must be greater
than zero.
|
void |
setAttemptsPerChunk(VariableAmount count)
Sets the number of fires to attempt to spawn per chunk, must be greater
than zero.
|
void |
setHeightRange(VariableAmount height)
Sets the height range that the object will be placed within.
|
void |
setObject(PopulatorObject obj)
Sets the
PopulatorObject for this populator to attempt to place. |
void |
setSpawnChance(double chance)
Sets the chance of spawning the object for each attempt.
|
static RandomObject.Builder builder()
RandomObject.Builder
to build a RandomObject
populator.VariableAmount getAttemptsPerChunk()
void setAttemptsPerChunk(VariableAmount count)
count
- The new number to spawndefault void setAttemptsPerChunk(int count)
count
- The new number to spawnVariableAmount getHeightRange()
void setHeightRange(VariableAmount height)
height
- The new height rangePopulatorObject getObject()
PopulatorObject
that this populator will attempt to
place.void setObject(PopulatorObject obj)
PopulatorObject
for this populator to attempt to place.obj
- The new populator objectdouble getSpawnChance()
void setSpawnChance(double chance)
chance
- The new spawn chance