Class StructuresConfig

java.lang.Object
net.minecraft.world.gen.chunk.placement.StructuresConfig

public class StructuresConfig extends Object
Contains the configuration for placement of each structure type during chunk generation.
Mappings:
Namespace Name
official cuj
intermediary net/minecraft/class_5311
named net/minecraft/world/gen/chunk/placement/StructuresConfig
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<StructuresConfig> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lcuj;a:Lcom/mojang/serialization/Codec;
      intermediary field_24821 Lnet/minecraft/class_5311;field_24821:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;CODEC:Lcom/mojang/serialization/Codec;
    • DEFAULT_PLACEMENTS

      public static final ImmutableMap<StructureFeature<?>,StructurePlacement> 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 b Lcuj;b:Lcom/google/common/collect/ImmutableMap;
      intermediary field_24822 Lnet/minecraft/class_5311;field_24822:Lcom/google/common/collect/ImmutableMap;
      named DEFAULT_PLACEMENTS Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;DEFAULT_PLACEMENTS:Lcom/google/common/collect/ImmutableMap;
    • STRONGHOLD_PLACEMENT

      public static final ConcentricRingsStructurePlacement STRONGHOLD_PLACEMENT
      Default structure placement for the stronghold.
      Mappings:
      Namespace Name Mixin selector
      official c Lcuj;c:Ldfu;
      intermediary field_24823 Lnet/minecraft/class_5311;field_24823:Lnet/minecraft/class_6871;
      named STRONGHOLD_PLACEMENT Lnet/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 d Lcuj;d:Lcom/google/common/collect/ImmutableMap;
      intermediary field_36413 Lnet/minecraft/class_5311;field_36413:Lcom/google/common/collect/ImmutableMap;
      named DEFAULT_PLACEMENTS_WITH_STRONGHOLD Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;DEFAULT_PLACEMENTS_WITH_STRONGHOLD:Lcom/google/common/collect/ImmutableMap;
    • placements

      private final Map<StructureFeature<?>,StructurePlacement> placements
      Mappings:
      Namespace Name Mixin selector
      official e Lcuj;e:Ljava/util/Map;
      intermediary field_24824 Lnet/minecraft/class_5311;field_24824:Ljava/util/Map;
      named placements Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;placements:Ljava/util/Map;
  • Constructor Details

    • StructuresConfig

      public StructuresConfig(Map<StructureFeature<?>,StructurePlacement> placements)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcuj;<init>(Ljava/util/Map;)V
      intermediary <init> Lnet/minecraft/class_5311;<init>(Ljava/util/Map;)V
      named <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)V
      intermediary <init> Lnet/minecraft/class_5311;<init>(Z)V
      named <init> Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;<init>(Z)V
  • Method Details

    • getStructures

      public Map<StructureFeature<?>,StructurePlacement> getStructures()
      Mappings:
      Namespace Name Mixin selector
      official a Lcuj;a()Ljava/util/Map;
      intermediary method_28598 Lnet/minecraft/class_5311;method_28598()Ljava/util/Map;
      named getStructures Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;getStructures()Ljava/util/Map;
    • getForType

      @Nullable public @Nullable StructurePlacement 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.
      Mappings:
      Namespace Name Mixin selector
      official a Lcuj;a(Lcyx;)Ldfx;
      intermediary method_28600 Lnet/minecraft/class_5311;method_28600(Lnet/minecraft/class_3195;)Lnet/minecraft/class_6874;
      named getForType Lnet/minecraft/world/gen/chunk/placement/StructuresConfig;getForType(Lnet/minecraft/world/gen/feature/StructureFeature;)Lnet/minecraft/world/gen/chunk/placement/StructurePlacement;