Package net.minecraftforge.common.world
Class StructureSettingsBuilder
java.lang.Object
net.minecraftforge.common.world.StructureSettingsBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<MobCategory,
StructureSettingsBuilder.StructureSpawnOverrideBuilder> private GenerationStep.Decoration
private TerrainAdjustment
-
Constructor Summary
ModifierConstructorDescriptionprivate
StructureSettingsBuilder
(HolderSet<Biome> biomes, Map<MobCategory, StructureSpawnOverride> spawnOverrides, GenerationStep.Decoration step, TerrainAdjustment terrainAdaptation) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
static StructureSettingsBuilder
copyOf
(Structure.StructureSettings settings) Gets the world generation decoration step the structure spawns during.getOrAddSpawnOverrides
(MobCategory category) Gets or creates a mutable builder for the spawn overrides of a given mob category.getSpawnOverrides
(MobCategory category) Gets a mutable builder for the spawn overrides of a given mob category ornull
if no overrides are defined for that category.Gets the way the structure adapts to the terrain during generation.void
removeSpawnOverrides
(MobCategory category) Removes the spawn overrides for the given mob category.void
void
Sets the world generation decoration step the structure spawns during.void
setTerrainAdaptation
(TerrainAdjustment terrainAdaptation) Sets the way the structure adapts to the terrain during generation.
-
Field Details
-
biomes
-
spawnOverrides
private final Map<MobCategory,StructureSettingsBuilder.StructureSpawnOverrideBuilder> spawnOverrides -
step
-
terrainAdaptation
-
-
Constructor Details
-
StructureSettingsBuilder
private StructureSettingsBuilder(HolderSet<Biome> biomes, Map<MobCategory, StructureSpawnOverride> spawnOverrides, GenerationStep.Decoration step, TerrainAdjustment terrainAdaptation)
-
-
Method Details
-
copyOf
- Parameters:
settings
- Existing StructureSettings.- Returns:
- A new builder with a copy of that StructureSettings's values.
-
build
- Returns:
- A new StructureSettings with the finalized values.
-
getBiomes
-
setBiomes
-
getSpawnOverrides
@Nullable public @Nullable StructureSettingsBuilder.StructureSpawnOverrideBuilder getSpawnOverrides(MobCategory category) Gets a mutable builder for the spawn overrides of a given mob category ornull
if no overrides are defined for that category.- Parameters:
category
- Mob category
-
getOrAddSpawnOverrides
public StructureSettingsBuilder.StructureSpawnOverrideBuilder getOrAddSpawnOverrides(MobCategory category) Gets or creates a mutable builder for the spawn overrides of a given mob category. If the override needed to be created it will default to piece bounding.- Parameters:
category
- Mob category
-
removeSpawnOverrides
Removes the spawn overrides for the given mob category.- Parameters:
category
- Mob category
-
getDecorationStep
Gets the world generation decoration step the structure spawns during. -
setDecorationStep
Sets the world generation decoration step the structure spawns during. -
getTerrainAdaptation
Gets the way the structure adapts to the terrain during generation. -
setTerrainAdaptation
Sets the way the structure adapts to the terrain during generation.- Parameters:
terrainAdaptation
- New terrain adjustment
-