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 cucintermediary net/minecraft/class_5311named net/minecraft/world/gen/chunk/placement/StructuresConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StructuresConfig>private final ImmutableMap<StructureFeature<?>,ImmutableMultimap<RegistryKey<ConfiguredStructureFeature<?, ?>>, RegistryKey<Biome>>> 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 TypeMethodDescriptiongetConfiguredStructureFeature(StructureFeature<?> feature) getForType(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 aLcuc;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 bLcuc;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 cLcuc;c:Ldfz;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 dLcuc;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 eLcuc;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;
-
configuredStructures
private final ImmutableMap<StructureFeature<?>,ImmutableMultimap<RegistryKey<ConfiguredStructureFeature<?, configuredStructures?>>, RegistryKey<Biome>>> - Mappings:
Namespace Name Mixin selector official fLcuc;f:Lcom/google/common/collect/ImmutableMap;intermediary field_34696Lnet/minecraft/class_5311;field_34696:Lcom/google/common/collect/ImmutableMap;named configuredStructuresLnet/minecraft/world/gen/chunk/placement/StructuresConfig;configuredStructures:Lcom/google/common/collect/ImmutableMap;
-
-
Constructor Details
-
StructuresConfig
- Mappings:
Namespace Name Mixin selector official <init>Lcuc;<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>Lcuc;<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 aLcuc;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 aLcuc;a(Lcyr;)Ldgc;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;
-
getConfiguredStructureFeature
public ImmutableMultimap<RegistryKey<ConfiguredStructureFeature<?,?>>, getConfiguredStructureFeatureRegistryKey<Biome>> (StructureFeature<?> feature) - Mappings:
Namespace Name Mixin selector official bLcuc;b(Lcyr;)Lcom/google/common/collect/ImmutableMultimap;intermediary method_38424Lnet/minecraft/class_5311;method_38424(Lnet/minecraft/class_3195;)Lcom/google/common/collect/ImmutableMultimap;named getConfiguredStructureFeatureLnet/minecraft/world/gen/chunk/placement/StructuresConfig;getConfiguredStructureFeature(Lnet/minecraft/world/gen/feature/StructureFeature;)Lcom/google/common/collect/ImmutableMultimap;
-