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 Details

    • CODEC

      public static final com.mojang.serialization.Codec<StructuresConfig> CODEC
    • DEFAULT_STRUCTURES

      public static final ImmutableMap<StructureFeature<?>,​StructureConfig> 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

      public static final StrongholdConfig DEFAULT_STRONGHOLD
      Default placement settings for the stronghold.
    • structures

      private final Map<StructureFeature<?>,​StructureConfig> structures
    • stronghold

      @Nullable private final StrongholdConfig 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