public static interface RandomBlock.Builder extends ResettableBuilder<RandomBlock,RandomBlock.Builder>
RandomBlock
populators.Modifier and Type | Method and Description |
---|---|
RandomBlock.Builder |
block(BlockState block)
Sets the
BlockState that this populator will randomly
distribute. |
RandomBlock |
build()
Builds a new instance of a
RandomBlock populator with the
settings set within the builder. |
RandomBlock.Builder |
height(VariableAmount height)
Sets the height range of the random block placement.
|
default RandomBlock.Builder |
perChunk(int count)
Sets the number of blocks to attempt to spawn per chunk, must be
greater than zero.
|
RandomBlock.Builder |
perChunk(VariableAmount count)
Sets the number of blocks to attempt to spawn per chunk, must be
greater than zero.
|
RandomBlock.Builder |
placementTarget(Predicate<Location<World>> target)
|
from, reset
RandomBlock.Builder block(BlockState block)
BlockState
that this populator will randomly
distribute.block
- The new block stateRandomBlock.Builder perChunk(VariableAmount count)
count
- The new number to spawndefault RandomBlock.Builder perChunk(int count)
count
- The new number to spawnRandomBlock.Builder placementTarget(Predicate<Location<World>> target)
Predicate
that this populator used to determine of a
given BlockType
is valid to attempt to place a block of fire
on top of.target
- The new targeted block predicateRandomBlock.Builder height(VariableAmount height)
height
- The new height rangeRandomBlock 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