Modifier and Type | Interface and Description |
---|---|
static interface |
Flower.Builder
A builder for constructing
Flower populators. |
Modifier and Type | Method and Description |
---|---|
static Flower.Builder |
builder()
Creates a new
Flower.Builder to build a Flower populator. |
default void |
clearSupplierOverride()
Clears the supplier override to force the weighted table to be used
instead.
|
VariableAmount |
getFlowersPerChunk()
Gets the number of flowers to attempt to spawn per chunk, must be greater
than zero.
|
WeightedTable<PlantType> |
getFlowerTypes()
Gets a mutable weighted collection of plant type for this populator to
spawn.
|
Optional<Function<Location<Extent>,PlantType>> |
getSupplierOverride()
Gets the overriding supplier if it exists.
|
default void |
setFlowersPerChunk(int count)
Sets the number of flowers to attempt to spawn per chunk, must be greater
than zero.
|
void |
setFlowersPerChunk(VariableAmount count)
Sets the number of flowers to attempt to spawn per chunk, must be greater
than zero.
|
void |
setSupplierOverride(Function<Location<Extent>,PlantType> override)
Sets the overriding supplier.
|
static Flower.Builder builder()
Flower.Builder
to build a Flower
populator.VariableAmount getFlowersPerChunk()
void setFlowersPerChunk(VariableAmount count)
Note: This number is not a definite number and the final count of flowers which are successfully spawned by the populator will almost always be lower.
count
- The new amount to spawndefault void setFlowersPerChunk(int count)
Note: This number is not a definite number and the final count of flowers which are successfully spawned by the populator will almost always be lower.
count
- The new amount to spawnWeightedTable<PlantType> getFlowerTypes()
Optional<Function<Location<Extent>,PlantType>> getSupplierOverride()
void setSupplierOverride(@Nullable Function<Location<Extent>,PlantType> override)
override
- The new supplier override, or nulldefault void clearSupplierOverride()