类 StructureConfig
- java.lang.Object
-
- net.minecraft.world.gen.chunk.StructureConfig
-
public class StructureConfig extends Object
Contains parameters for placement of a single type ofStructureFeatureduring chunk generation.- Mappings:
Namespace Name official cvhintermediary net/minecraft/class_5314named net/minecraft/world/gen/chunk/StructureConfig
-
-
字段概要
字段 修饰符和类型 字段 说明 static com.mojang.serialization.Codec<StructureConfig>CODECprivate intsaltUsed 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 intseparationDefines the margin of each cell in the placement grid, which leads to guaranteeing a certain minimum distance between each placed structure.private intspacingDefines 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 aLcvh;a:Lcom/mojang/serialization/Codec;intermediary field_24917Lnet/minecraft/class_5314;field_24917:Lcom/mojang/serialization/Codec;named CODECLnet/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 bLcvh;b:Iintermediary field_24918Lnet/minecraft/class_5314;field_24918:Inamed spacingLnet/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 cLcvh;c:Iintermediary field_24919Lnet/minecraft/class_5314;field_24919:Inamed separationLnet/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 dLcvh;d:Iintermediary field_24920Lnet/minecraft/class_5314;field_24920:Inamed saltLnet/minecraft/world/gen/chunk/StructureConfig;salt:I
-
-
方法详细资料
-
getSpacing
public int getSpacing()
- Mappings:
Namespace Name Mixin selector official aLcvh;a()Iintermediary method_28803Lnet/minecraft/class_5314;method_28803()Inamed getSpacingLnet/minecraft/world/gen/chunk/StructureConfig;getSpacing()I
-
getSeparation
public int getSeparation()
- Mappings:
Namespace Name Mixin selector official bLcvh;b()Iintermediary method_28806Lnet/minecraft/class_5314;method_28806()Inamed getSeparationLnet/minecraft/world/gen/chunk/StructureConfig;getSeparation()I
-
getSalt
public int getSalt()
- Mappings:
Namespace Name Mixin selector official cLcvh;c()Iintermediary method_28808Lnet/minecraft/class_5314;method_28808()Inamed getSaltLnet/minecraft/world/gen/chunk/StructureConfig;getSalt()I
-
-