Modifier and Type | Interface and Description |
---|---|
static interface |
DoublePlant.Builder
A builder for constructing
DoublePlant populators. |
Modifier and Type | Method and Description |
---|---|
static DoublePlant.Builder |
builder()
Creates a new
DoublePlant.Builder to build a DoublePlant populator. |
default void |
clearSupplierOverride()
Clears the supplier override to force the weighted table to be used
instead.
|
VariableAmount |
getPlantsPerChunk()
Gets the number of plants to create per chunk.
|
WeightedTable<DoublePlantType> |
getPossibleTypes()
Gets a mutable weighted collection of possible plants which may be
selected to be spawned in by this populator.
|
Optional<Function<Location<Extent>,DoublePlantType>> |
getSupplierOverride()
Gets the overriding supplier if it exists.
|
default void |
setPlantsPerChunk(int count)
Sets the number of plants to create per chunk, cannot be negative.
|
void |
setPlantsPerChunk(VariableAmount count)
Sets the number of plants to create per chunk, cannot be negative.
|
void |
setSupplierOverride(Function<Location<Extent>,DoublePlantType> override)
Sets the overriding supplier.
|
static DoublePlant.Builder builder()
DoublePlant.Builder
to build a DoublePlant
populator.WeightedTable<DoublePlantType> getPossibleTypes()
VariableAmount getPlantsPerChunk()
void setPlantsPerChunk(VariableAmount count)
Note: This number is not a definite number and the final count of plants which are successfully spawned by the populator will almost always be lower.
count
- The new amountdefault void setPlantsPerChunk(int count)
Note: This number is not a definite number and the final count of plants which are successfully spawned by the populator will almost always be lower.
count
- The new amountOptional<Function<Location<Extent>,DoublePlantType>> getSupplierOverride()
void setSupplierOverride(@Nullable Function<Location<Extent>,DoublePlantType> override)
override
- The new supplier override, or nulldefault void clearSupplierOverride()