Modifier and Type | Interface and Description |
---|---|
static interface |
Forest.Builder
A builder for constructing
Forest populators. |
Modifier and Type | Method and Description |
---|---|
static Forest.Builder |
builder()
Creates a new
Forest.Builder to build a Forest populator. |
default void |
clearSupplierOverride()
Clears the supplier override to force the weighted table to be used
instead.
|
Optional<Function<Location<Extent>,PopulatorObject>> |
getSupplierOverride()
Gets the overriding supplier if it exists.
|
VariableAmount |
getTreesPerChunk()
Gets the number of trees to attempt to spawn per chunk, must be greater
than zero.
|
WeightedTable<PopulatorObject> |
getTypes()
Gets the a mutable weighted collection of
PopulatorObject s to
spawn. |
void |
setSupplierOverride(Function<Location<Extent>,PopulatorObject> override)
Sets the overriding supplier.
|
default void |
setTreesPerChunk(int count)
Sets the number of trees to attempt to spawn per chunk, must be greater
than zero.
|
void |
setTreesPerChunk(VariableAmount count)
Sets the number of trees to attempt to spawn per chunk, must be greater
than zero.
|
static Forest.Builder builder()
Forest.Builder
to build a Forest
populator.VariableAmount getTreesPerChunk()
void setTreesPerChunk(VariableAmount count)
count
- The new amount to spawndefault void setTreesPerChunk(int count)
count
- The new amount to spawnWeightedTable<PopulatorObject> getTypes()
PopulatorObject
s to
spawn.Optional<Function<Location<Extent>,PopulatorObject>> getSupplierOverride()
void setSupplierOverride(@Nullable Function<Location<Extent>,PopulatorObject> override)
override
- The new supplier override, or nulldefault void clearSupplierOverride()