类 StructureConfig


  • public class StructureConfig
    extends Object
    Contains parameters for placement of a single type of StructureFeature during chunk generation.
    Mappings:
    Namespace Name
    official cvh
    intermediary net/minecraft/class_5314
    named net/minecraft/world/gen/chunk/StructureConfig
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static com.mojang.serialization.Codec<StructureConfig> CODEC  
      private int salt
      Used together with the world seed and a grid cell's x,y coordinates to seed the RNG when deciding whether a structure should really be placed in a grid cell or not.
      private int separation
      Defines the margin of each cell in the placement grid, which leads to guaranteeing a certain minimum distance between each placed structure.
      private int spacing
      Defines the width and height of a cell in the structure placement grid in chunks.
    • 构造器概要

      构造器 
      构造器 说明
      StructureConfig​(int spacing, int separation, int salt)  
    • 字段详细资料

      • CODEC

        public static final com.mojang.serialization.Codec<StructureConfig> CODEC
        Mappings:
        Namespace Name Mixin selector
        official a Lcvh;a:Lcom/mojang/serialization/Codec;
        intermediary field_24917 Lnet/minecraft/class_5314;field_24917:Lcom/mojang/serialization/Codec;
        named CODEC Lnet/minecraft/world/gen/chunk/StructureConfig;CODEC:Lcom/mojang/serialization/Codec;
      • spacing

        private final int spacing
        Defines the width and height of a cell in the structure placement grid in chunks.

        For each cell in the grid, the chunk generator will attempt to place the start of a structure.

        Minimum is 1, which means the structure will potentially be placed in every chunk. 2 leads to one structure per 2x2 chunks, and so on.

        Mappings:
        Namespace Name Mixin selector
        official b Lcvh;b:I
        intermediary field_24918 Lnet/minecraft/class_5314;field_24918:I
        named spacing Lnet/minecraft/world/gen/chunk/StructureConfig;spacing:I
      • separation

        private final int separation
        Defines the margin of each cell in the placement grid, which leads to guaranteeing a certain minimum distance between each placed structure.

        The margin is effectively subtracted from the width and height of a cell when trying to determine the actual starting chunk within the cell.

        A value of 0 means that the structure can be placed in any chunk within a grid cell, which also means two structures from adjacent grid cells could be placed directly next to each other.

        A value that equals spacing - 1 will restrict placement of the structure to the chunk at 0,0 of the grid cell.

        This value must be between 0 and spacing - 1, and is expressed in chunks.

        Mappings:
        Namespace Name Mixin selector
        official c Lcvh;c:I
        intermediary field_24919 Lnet/minecraft/class_5314;field_24919:I
        named separation Lnet/minecraft/world/gen/chunk/StructureConfig;separation:I
      • salt

        private final int salt
        Used together with the world seed and a grid cell's x,y coordinates to seed the RNG when deciding whether a structure should really be placed in a grid cell or not. This is used to avoid that two types of structures that have the same spacing always occur in the same chunks of their placement grid, and thus in the same world chunk.
        Mappings:
        Namespace Name Mixin selector
        official d Lcvh;d:I
        intermediary field_24920 Lnet/minecraft/class_5314;field_24920:I
        named salt Lnet/minecraft/world/gen/chunk/StructureConfig;salt:I
    • 构造器详细资料

      • StructureConfig

        public StructureConfig​(int spacing,
                               int separation,
                               int salt)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lcvh;<init>(III)V
        intermediary <init> Lnet/minecraft/class_5314;<init>(III)V
        named <init> Lnet/minecraft/world/gen/chunk/StructureConfig;<init>(III)V
    • 方法详细资料

      • getSpacing

        public int getSpacing()
        Mappings:
        Namespace Name Mixin selector
        official a Lcvh;a()I
        intermediary method_28803 Lnet/minecraft/class_5314;method_28803()I
        named getSpacing Lnet/minecraft/world/gen/chunk/StructureConfig;getSpacing()I
      • getSeparation

        public int getSeparation()
        Mappings:
        Namespace Name Mixin selector
        official b Lcvh;b()I
        intermediary method_28806 Lnet/minecraft/class_5314;method_28806()I
        named getSeparation Lnet/minecraft/world/gen/chunk/StructureConfig;getSeparation()I
      • getSalt

        public int getSalt()
        Mappings:
        Namespace Name Mixin selector
        official c Lcvh;c()I
        intermediary method_28808 Lnet/minecraft/class_5314;method_28808()I
        named getSalt Lnet/minecraft/world/gen/chunk/StructureConfig;getSalt()I