Class StructureConfig
StructureFeature during chunk
generation.- Mappings:
Namespace Name official cwlintermediary net/minecraft/class_5314named net/minecraft/world/gen/chunk/StructureConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec<StructureConfig>private intUsed 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 intDefines the margin of each cell in the placement grid, which leads to guaranteeing a certain minimum distance between each placed structure.private intDefines the width and height of a cell in the structure placement grid in chunks. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official aLcwl;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 spacingDefines 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 bLcwl;b:Iintermediary field_24918Lnet/minecraft/class_5314;field_24918:Inamed spacingLnet/minecraft/world/gen/chunk/StructureConfig;spacing:I
-
separation
private final int separationDefines 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 cLcwl;c:Iintermediary field_24919Lnet/minecraft/class_5314;field_24919:Inamed separationLnet/minecraft/world/gen/chunk/StructureConfig;separation:I
-
salt
private final int saltUsed 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 dLcwl;d:Iintermediary field_24920Lnet/minecraft/class_5314;field_24920:Inamed saltLnet/minecraft/world/gen/chunk/StructureConfig;salt:I
-
-
Constructor Details
-
StructureConfig
public StructureConfig(int spacing, int separation, int salt)- Mappings:
Namespace Name Mixin selector official <init>Lcwl;<init>(III)Vintermediary <init>Lnet/minecraft/class_5314;<init>(III)Vnamed <init>Lnet/minecraft/world/gen/chunk/StructureConfig;<init>(III)V
-
-
Method Details
-
getSpacing
public int getSpacing()- Mappings:
Namespace Name Mixin selector official aLcwl;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 bLcwl;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 cLcwl;c()Iintermediary method_28808Lnet/minecraft/class_5314;method_28808()Inamed getSaltLnet/minecraft/world/gen/chunk/StructureConfig;getSalt()I
-