Modifier and Type | Interface and Description |
---|---|
static interface |
Mushroom.Builder
A builder for constructing
Mushroom populators. |
Modifier and Type | Method and Description |
---|---|
static Mushroom.Builder |
builder()
Creates a new
Mushroom.Builder to build a Mushroom populator. |
default void |
clearSupplierOverride()
Clears the supplier override to force the chance table to be used
instead.
|
VariableAmount |
getMushroomsPerChunk()
Gets a representation of the amount of mushrooms which will be attempted
to be spawned per chunk.
|
Optional<Function<Location<Extent>,MushroomType>> |
getSupplierOverride()
Gets the overriding supplier if it exists.
|
ChanceTable<MushroomType> |
getTypes()
Gets a mutable
ChanceTable of possible mushroom types to spawn. |
default void |
setMushroomsPerChunk(int count)
Sets the amount of mushrooms which will be attempted to be spawned per
chunk.
|
void |
setMushroomsPerChunk(VariableAmount count)
Sets the representation of the amount of mushrooms which will be
attempted to be spawned per chunk.
|
void |
setSupplierOverride(Function<Location<Extent>,MushroomType> override)
Sets the overriding supplier.
|
static Mushroom.Builder builder()
Mushroom.Builder
to build a Mushroom
populator.ChanceTable<MushroomType> getTypes()
ChanceTable
of possible mushroom types to spawn.
If the list is empty then a MushroomType
will be selected at
random from all available MushroomTypes
.VariableAmount getMushroomsPerChunk()
Note: This number is not a definite number and the final count of mushrooms which are successfully spawned by the populator will almost always be lower.
void setMushroomsPerChunk(VariableAmount count)
Note: This number is not a definite number and the final count of mushrooms which are successfully spawned by the populator will almost always be lower.
count
- The new amount to attempt to createdefault void setMushroomsPerChunk(int count)
Note: This number is not a definite number and the final count of mushrooms which are successfully spawned by the populator will almost always be lower.
count
- The new amount to attempt to createOptional<Function<Location<Extent>,MushroomType>> getSupplierOverride()
void setSupplierOverride(@Nullable Function<Location<Extent>,MushroomType> override)
override
- The new supplier override, or nulldefault void clearSupplierOverride()