Package net.minecraft.world.gen.chunk
Class StructuresConfig
java.lang.Object
net.minecraft.world.gen.chunk.StructuresConfig
public class StructuresConfig extends Object
Contains the configuration for placement of each structure type during chunk generation.
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<StructuresConfig>
CODEC
static StrongholdConfig
DEFAULT_STRONGHOLD
Default placement settings for the stronghold.static ImmutableMap<StructureFeature<?>,StructureConfig>
DEFAULT_STRUCTURES
Default placement settings for each known structure type.private StrongholdConfig
stronghold
Placement settings for the stronghold for this particular combination of settings, may be null to disable placement of strongholds.private Map<StructureFeature<?>,StructureConfig>
structures
-
Constructor Summary
Constructors Constructor Description StructuresConfig(boolean withStronghold)
Creates a new structure placement configuration with default values.StructuresConfig(Optional<StrongholdConfig> stronghold, Map<StructureFeature<?>,StructureConfig> structures)
-
Method Summary
Modifier and Type Method Description StructureConfig
getForType(StructureFeature<?> structureType)
Gets the placement configuration for a specific structure type, or a default placement if placement for the structure was not explicitly configured.StrongholdConfig
getStronghold()
Map<StructureFeature<?>,StructureConfig>
getStructures()
-
Field Details
-
CODEC
-
DEFAULT_STRUCTURES
Default placement settings for each known structure type. At startup, Minecraft validates that each registered structure has a default configuration in this map. If mods register structures after this class has been initialized, the check will already have been made and a bad default configuration will be used instead (see below). -
DEFAULT_STRONGHOLD
Default placement settings for the stronghold. -
structures
-
stronghold
Placement settings for the stronghold for this particular combination of settings, may be null to disable placement of strongholds.
-
-
Constructor Details
-
StructuresConfig
public StructuresConfig(Optional<StrongholdConfig> stronghold, Map<StructureFeature<?>,StructureConfig> structures) -
StructuresConfig
public StructuresConfig(boolean withStronghold)Creates a new structure placement configuration with default values.- Parameters:
withStronghold
- determines if the default stronghold configuration should be included
-
-
Method Details
-
getStructures
-
getForType
Gets the placement configuration for a specific structure type, or a default placement if placement for the structure was not explicitly configured. -
getStronghold
-