Class StructureConfig
StructureFeature
during chunk
generation.- Mappings:
Namespace Name official cwl
intermediary net/minecraft/class_5314
named net/minecraft/world/gen/chunk/StructureConfig
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec<StructureConfig>
private int
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
Defines the margin of each cell in the placement grid, which leads to guaranteeing a certain minimum distance between each placed structure.private int
Defines the width and height of a cell in the structure placement grid in chunks. -
Constructor Summary
-
Method Summary
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lcwl;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 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 b
Lcwl;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 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 c
Lcwl;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 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 d
Lcwl;d:I
intermediary field_24920
Lnet/minecraft/class_5314;field_24920:I
named salt
Lnet/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)V
intermediary <init>
Lnet/minecraft/class_5314;<init>(III)V
named <init>
Lnet/minecraft/world/gen/chunk/StructureConfig;<init>(III)V
-
-
Method Details
-
getSpacing
public int getSpacing()- Mappings:
Namespace Name Mixin selector official a
Lcwl;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
Lcwl;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
Lcwl;c()I
intermediary method_28808
Lnet/minecraft/class_5314;method_28808()I
named getSalt
Lnet/minecraft/world/gen/chunk/StructureConfig;getSalt()I
-