类 StructuresConfig


  • public class StructuresConfig
    extends Object
    Contains the configuration for placement of each structure type during chunk generation.
    Mappings:
    Namespace Name
    official cpd
    intermediary net/minecraft/class_5311
    named net/minecraft/world/gen/chunk/StructuresConfig
    • 字段详细资料

      • CODEC

        public static final com.mojang.serialization.Codec<StructuresConfig> CODEC
        Mappings:
        Namespace Name Mixin selector
        official a Lcpd;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/StructuresConfig;CODEC:Lcom/mojang/serialization/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).
        Mappings:
        Namespace Name Mixin selector
        official b Lcpd;b:Lcom/google/common/collect/ImmutableMap;
        intermediary field_24822 Lnet/minecraft/class_5311;field_24822:Lcom/google/common/collect/ImmutableMap;
        named DEFAULT_STRUCTURES Lnet/minecraft/world/gen/chunk/StructuresConfig;DEFAULT_STRUCTURES:Lcom/google/common/collect/ImmutableMap;
      • DEFAULT_STRONGHOLD

        public static final StrongholdConfig DEFAULT_STRONGHOLD
        Default placement settings for the stronghold.
        Mappings:
        Namespace Name Mixin selector
        official c Lcpd;c:Lcvg;
        intermediary field_24823 Lnet/minecraft/class_5311;field_24823:Lnet/minecraft/class_5313;
        named DEFAULT_STRONGHOLD Lnet/minecraft/world/gen/chunk/StructuresConfig;DEFAULT_STRONGHOLD:Lnet/minecraft/world/gen/chunk/StrongholdConfig;
      • structures

        private final Map<StructureFeature<?>,​StructureConfig> structures
        Mappings:
        Namespace Name Mixin selector
        official d Lcpd;d:Ljava/util/Map;
        intermediary field_24824 Lnet/minecraft/class_5311;field_24824:Ljava/util/Map;
        named structures Lnet/minecraft/world/gen/chunk/StructuresConfig;structures:Ljava/util/Map;
      • stronghold

        @Nullable
        private final @Nullable StrongholdConfig stronghold
        Placement settings for the stronghold for this particular combination of settings, may be null to disable placement of strongholds.
        Mappings:
        Namespace Name Mixin selector
        official e Lcpd;e:Lcvg;
        intermediary field_24825 Lnet/minecraft/class_5311;field_24825:Lnet/minecraft/class_5313;
        named stronghold Lnet/minecraft/world/gen/chunk/StructuresConfig;stronghold:Lnet/minecraft/world/gen/chunk/StrongholdConfig;
    • 构造器详细资料

      • StructuresConfig

        public StructuresConfig​(Optional<StrongholdConfig> stronghold,
                                Map<StructureFeature<?>,​StructureConfig> structures)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lcpd;<init>(Ljava/util/Optional;Ljava/util/Map;)V
        intermediary <init> Lnet/minecraft/class_5311;<init>(Ljava/util/Optional;Ljava/util/Map;)V
        named <init> Lnet/minecraft/world/gen/chunk/StructuresConfig;<init>(Ljava/util/Optional;Ljava/util/Map;)V
      • StructuresConfig

        public StructuresConfig​(boolean withStronghold)
        Creates a new structure placement configuration with default values.
        参数:
        withStronghold - determines if the default stronghold configuration should be included
        Mappings:
        Namespace Name Mixin selector
        official <init> Lcpd;<init>(Z)V
        intermediary <init> Lnet/minecraft/class_5311;<init>(Z)V
        named <init> Lnet/minecraft/world/gen/chunk/StructuresConfig;<init>(Z)V
    • 方法详细资料

      • getStructures

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

        @Nullable
        public @Nullable 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.
        Mappings:
        Namespace Name Mixin selector
        official a Lcpd;a(Lcsx;)Lcvh;
        intermediary method_28600 Lnet/minecraft/class_5311;method_28600(Lnet/minecraft/class_3195;)Lnet/minecraft/class_5314;
        named getForType Lnet/minecraft/world/gen/chunk/StructuresConfig;getForType(Lnet/minecraft/world/gen/feature/StructureFeature;)Lnet/minecraft/world/gen/chunk/StructureConfig;
      • getStronghold

        @Nullable
        public @Nullable StrongholdConfig getStronghold()
        Mappings:
        Namespace Name Mixin selector
        official b Lcpd;b()Lcvg;
        intermediary method_28602 Lnet/minecraft/class_5311;method_28602()Lnet/minecraft/class_5313;
        named getStronghold Lnet/minecraft/world/gen/chunk/StructuresConfig;getStronghold()Lnet/minecraft/world/gen/chunk/StrongholdConfig;