Class StructuresConfig
java.lang.Object
net.minecraft.world.gen.chunk.placement.StructuresConfig
Contains the configuration for placement of each structure type during chunk generation.
- Mappings:
Namespace Name official cujintermediary net/minecraft/class_5311named net/minecraft/world/gen/chunk/placement/StructuresConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StructuresConfig>static final ImmutableMap<StructureFeature<?>,StructurePlacement> Default structure placements for each known structure type.static final ImmutableMap<StructureFeature<?>,StructurePlacement> private final Map<StructureFeature<?>,StructurePlacement> static final ConcentricRingsStructurePlacementDefault structure placement for the stronghold. -
Constructor Summary
ConstructorsConstructorDescriptionStructuresConfig(boolean withStronghold) Creates a new structure placement configuration with default values.StructuresConfig(Map<StructureFeature<?>, StructurePlacement> placements) -
Method Summary
Modifier and TypeMethodDescriptiongetForType(StructureFeature<?> structureType) Gets the structure placement for a specific structure type, or a default placement if placement for the structure was not explicitly configured.
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official aLcuj;a:Lcom/mojang/serialization/Codec;intermediary field_24821Lnet/minecraft/class_5311;field_24821:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/world/gen/chunk/placement/StructuresConfig;CODEC:Lcom/mojang/serialization/Codec;
-
DEFAULT_PLACEMENTS
Default structure placements for each known structure type. At startup, Minecraft validates that each registered structure has a default placement 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).- Mappings:
Namespace Name Mixin selector official bLcuj;b:Lcom/google/common/collect/ImmutableMap;intermediary field_24822Lnet/minecraft/class_5311;field_24822:Lcom/google/common/collect/ImmutableMap;named DEFAULT_PLACEMENTSLnet/minecraft/world/gen/chunk/placement/StructuresConfig;DEFAULT_PLACEMENTS:Lcom/google/common/collect/ImmutableMap;
-
STRONGHOLD_PLACEMENT
Default structure placement for the stronghold.- Mappings:
Namespace Name Mixin selector official cLcuj;c:Ldfu;intermediary field_24823Lnet/minecraft/class_5311;field_24823:Lnet/minecraft/class_6871;named STRONGHOLD_PLACEMENTLnet/minecraft/world/gen/chunk/placement/StructuresConfig;STRONGHOLD_PLACEMENT:Lnet/minecraft/world/gen/chunk/placement/ConcentricRingsStructurePlacement;
-
DEFAULT_PLACEMENTS_WITH_STRONGHOLD
public static final ImmutableMap<StructureFeature<?>,StructurePlacement> DEFAULT_PLACEMENTS_WITH_STRONGHOLD- Mappings:
Namespace Name Mixin selector official dLcuj;d:Lcom/google/common/collect/ImmutableMap;intermediary field_36413Lnet/minecraft/class_5311;field_36413:Lcom/google/common/collect/ImmutableMap;named DEFAULT_PLACEMENTS_WITH_STRONGHOLDLnet/minecraft/world/gen/chunk/placement/StructuresConfig;DEFAULT_PLACEMENTS_WITH_STRONGHOLD:Lcom/google/common/collect/ImmutableMap;
-
placements
- Mappings:
Namespace Name Mixin selector official eLcuj;e:Ljava/util/Map;intermediary field_24824Lnet/minecraft/class_5311;field_24824:Ljava/util/Map;named placementsLnet/minecraft/world/gen/chunk/placement/StructuresConfig;placements:Ljava/util/Map;
-
-
Constructor Details
-
StructuresConfig
- Mappings:
Namespace Name Mixin selector official <init>Lcuj;<init>(Ljava/util/Map;)Vintermediary <init>Lnet/minecraft/class_5311;<init>(Ljava/util/Map;)Vnamed <init>Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;<init>(Ljava/util/Map;)V
-
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- Mappings:
Namespace Name Mixin selector official <init>Lcuj;<init>(Z)Vintermediary <init>Lnet/minecraft/class_5311;<init>(Z)Vnamed <init>Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;<init>(Z)V
-
-
Method Details
-
getStructures
- Mappings:
Namespace Name Mixin selector official aLcuj;a()Ljava/util/Map;intermediary method_28598Lnet/minecraft/class_5311;method_28598()Ljava/util/Map;named getStructuresLnet/minecraft/world/gen/chunk/placement/StructuresConfig;getStructures()Ljava/util/Map;
-
getForType
Gets the structure placement for a specific structure type, or a default placement if placement for the structure was not explicitly configured.- Mappings:
Namespace Name Mixin selector official aLcuj;a(Lcyx;)Ldfx;intermediary method_28600Lnet/minecraft/class_5311;method_28600(Lnet/minecraft/class_3195;)Lnet/minecraft/class_6874;named getForTypeLnet/minecraft/world/gen/chunk/placement/StructuresConfig;getForType(Lnet/minecraft/world/gen/feature/StructureFeature;)Lnet/minecraft/world/gen/chunk/placement/StructurePlacement;
-