Modifier and Type | Interface and Description |
---|---|
static interface |
RandomBlock.Builder
A builder for constructing
RandomBlock populators. |
Modifier and Type | Method and Description |
---|---|
static RandomBlock.Builder |
builder()
Creates a new
RandomBlock.Builder to build a RandomBlock populator. |
VariableAmount |
getAttemptsPerChunk()
Gets the number of blocks to attempt to spawn per chunk, must be greater
than zero.
|
BlockState |
getBlock()
Gets the
BlockState that this populator will randomly distribute. |
VariableAmount |
getHeightRange()
Gets the height that the block will be randomly placed within.
|
Predicate<Location<World>> |
getPlacementTarget()
|
void |
getPlacementTarget(Predicate<Location<World>> target)
|
default void |
setAttemptsPerChunk(int count)
Sets the number of blocks to attempt to spawn per chunk, must be greater
than zero.
|
void |
setAttemptsPerChunk(VariableAmount count)
Sets the number of blocks to attempt to spawn per chunk, must be greater
than zero.
|
void |
setBlock(BlockState block)
Sets the
BlockState that this populator will randomly distribute. |
void |
setHeightRange(VariableAmount height)
Sets the height that the blocks will be randomly placed within.
|
static RandomBlock.Builder builder()
RandomBlock.Builder
to build a RandomBlock
populator.BlockState getBlock()
BlockState
that this populator will randomly distribute.void setBlock(BlockState block)
BlockState
that this populator will randomly distribute.block
- The new block stateVariableAmount 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 rangePredicate<Location<World>> getPlacementTarget()
Predicate
that this populator used to determine of a
given Location
is valid to attempt to place a block at.