Modifier and Type | Interface and Description |
---|---|
static interface |
Dungeon.Builder
A builder for constructing
Dungeon populators. |
Modifier and Type | Method and Description |
---|---|
static Dungeon.Builder |
builder()
Creates a new
Dungeon.Builder to build a Dungeon populator. |
VariableAmount |
getAttemptsPerChunk()
Gets the number of attempts at randomly spawning a generator per chunk.
|
Optional<WeightedTable<EntityArchetype>> |
getChoices()
Gets a weighted collection of possible
EntityArchetype s that could be spawned. |
Optional<MobSpawnerData> |
getMobSpawnerData()
Gets the
MobSpawnerData which represents the MobSpawner which
will be created within the dungeon. |
LootTable<ItemStackSnapshot> |
getPossibleContents()
Gets a mutable weighted collection of possible contents of the chests.
|
default void |
setAttemptsPerChunk(int attempts)
Sets the number of attempts at randomly spawning a generator per chunk.
|
void |
setAttemptsPerChunk(VariableAmount attempts)
Sets the number of attempts at randomly spawning a generator per chunk.
|
void |
setChoices(WeightedTable<EntityArchetype> choices)
Sets the possible
EntityArchetype s that could be spawned. |
void |
setMobSpawnerData(MobSpawnerData data)
Sets
MobSpawnerData which will be used to create the spawner
within the dungeon. |
static Dungeon.Builder builder()
Dungeon.Builder
to build a Dungeon
populator.VariableAmount getAttemptsPerChunk()
void setAttemptsPerChunk(VariableAmount attempts)
attempts
- The new number of attemptsdefault void setAttemptsPerChunk(int attempts)
attempts
- The new number of attemptsOptional<MobSpawnerData> getMobSpawnerData()
Gets the MobSpawnerData
which represents the MobSpawner which
will be created within the dungeon.
Note: Only one of choices or mob spawner data will be present.
void setMobSpawnerData(MobSpawnerData data)
Sets MobSpawnerData
which will be used to create the spawner
within the dungeon.
Note: Only one of choices or mob spawner data will be present.
data
- MobSpawnerData to useOptional<WeightedTable<EntityArchetype>> getChoices()
Gets a weighted collection of possible
EntityArchetype
s that could be spawned. One type is chosen when
creating the dungeon, for more complex spawners see
getMobSpawnerData()
.
Note: Only one of choices or mob spawner data will be present.
void setChoices(WeightedTable<EntityArchetype> choices)
Sets the possible EntityArchetype
s that could be spawned.
One type is chosen when creating the dungeon, for more complex
spawners see setMobSpawnerData(MobSpawnerData)
Note: Only one of choices or mob spawner data will be present.
choices
- Weighted table of possible typesLootTable<ItemStackSnapshot> getPossibleContents()