public static interface Dungeon.Builder extends ResettableBuilder<Dungeon,Dungeon.Builder>
Dungeon
populators.Modifier and Type | Method and Description |
---|---|
default Dungeon.Builder |
attempts(int attempts)
Sets the number of attempts at randomly spawning a generator per
chunk.
|
Dungeon.Builder |
attempts(VariableAmount attempts)
Sets the number of attempts at randomly spawning a generator per
chunk.
|
Dungeon |
build()
Builds a new instance of a
Dungeon populator with the
settings set within the builder. |
Dungeon.Builder |
choices(WeightedTable<EntityArchetype> choices)
Sets the possible
EntityArchetype s that could be spawned. |
Dungeon.Builder |
mobSpawnerData(MobSpawnerData data)
Sets
MobSpawnerData that will be used to create the spawner
within the dungeon. |
Dungeon.Builder |
possibleItems(LootTable<ItemStackSnapshot> items)
Defines a
LootTable of ItemStackSnapshot s from which
items will be randomly selected based on weight in order to calculate
the contents of chests placed within the dungeon. |
from, reset
Dungeon.Builder attempts(VariableAmount attempts)
attempts
- The new number of attemptsdefault Dungeon.Builder attempts(int attempts)
attempts
- The new number of attemptsDungeon.Builder mobSpawnerData(MobSpawnerData data)
Sets MobSpawnerData
that 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 useDungeon.Builder choices(@Nullable 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 mobSpawnerData(MobSpawnerData)
}
To use the default set of choices, pass null
instead
of a table.
Note: Only one of choices or mob spawner data will be present.
choices
- Weighted table of possible typesDungeon.Builder possibleItems(LootTable<ItemStackSnapshot> items)
LootTable
of ItemStackSnapshot
s from which
items will be randomly selected based on weight in order to calculate
the contents of chests placed within the dungeon.items
- The possible itemsDungeon build() throws IllegalStateException
Dungeon
populator with the
settings set within the builder.IllegalStateException
- If there are any settings left unset
which do not have default values