Package net.minecraft.world.gen
Class StructureWeightSampler
java.lang.Object
net.minecraft.world.gen.StructureWeightSampler
- All Implemented Interfaces:
DensityFunction
,DensityFunction.class_6913
,DensityFunctionTypes.class_7050
Applies weights to noise values if they are near structures, placing terrain under them and hollowing out the space above them.
- Mappings:
Namespace Name official ctj
intermediary net/minecraft/class_5817
named net/minecraft/world/gen/StructureWeightSampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.gen.densityfunction.DensityFunction
DensityFunction.class_6911, DensityFunction.class_6913, DensityFunction.DensityFunctionVisitor, DensityFunction.NoisePos, DensityFunction.UnblendedNoisePos
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private static final int
private final ObjectListIterator<JigsawJunction>
private final ObjectList<JigsawJunction>
private final ObjectListIterator<StructurePiece>
private final ObjectList<StructurePiece>
private static final float[]
Fields inherited from interface net.minecraft.world.gen.densityfunction.DensityFunction
field_37057, field_37059, REGISTRY_ENTRY_CODEC
Fields inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionTypes.class_7050
CODEC
-
Constructor Summary
ModifierConstructorDescriptionprotected
StructureWeightSampler
(StructureAccessor structureAccessor, Chunk chunk) -
Method Summary
Modifier and TypeMethodDescriptionprivate static double
calculateStructureWeight
(int x, int y, int z) Calculates the structure weight for the given position.private static double
getMagnitudeWeight
(int x, int y, int z) private static double
getStructureWeight
(int x, int y, int z) Gets the structure weight from the array from the given position, or 0 if the position is out of bounds.double
maxValue()
double
minValue()
double
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.gen.densityfunction.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeeze
Methods inherited from interface net.minecraft.world.gen.densityfunction.DensityFunction.class_6913
apply, method_40470
Methods inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionTypes.class_7050
getCodec
-
Field Details
-
field_31461
public static final int field_31461- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lctj;a:I
intermediary field_31461
Lnet/minecraft/class_5817;field_31461:I
named field_31461
Lnet/minecraft/world/gen/StructureWeightSampler;field_31461:I
-
field_31462
private static final int field_31462- See Also:
- Mappings:
Namespace Name Mixin selector official f
Lctj;f:I
intermediary field_31462
Lnet/minecraft/class_5817;field_31462:I
named field_31462
Lnet/minecraft/world/gen/StructureWeightSampler;field_31462:I
-
STRUCTURE_WEIGHT_TABLE
private static final float[] STRUCTURE_WEIGHT_TABLE- Mappings:
Namespace Name Mixin selector official g
Lctj;g:[F
intermediary field_28741
Lnet/minecraft/class_5817;field_28741:[F
named STRUCTURE_WEIGHT_TABLE
Lnet/minecraft/world/gen/StructureWeightSampler;STRUCTURE_WEIGHT_TABLE:[F
-
pieces
- Mappings:
Namespace Name Mixin selector official h
Lctj;h:Lit/unimi/dsi/fastutil/objects/ObjectList;
intermediary field_28742
Lnet/minecraft/class_5817;field_28742:Lit/unimi/dsi/fastutil/objects/ObjectList;
named pieces
Lnet/minecraft/world/gen/StructureWeightSampler;pieces:Lit/unimi/dsi/fastutil/objects/ObjectList;
-
junctions
- Mappings:
Namespace Name Mixin selector official i
Lctj;i:Lit/unimi/dsi/fastutil/objects/ObjectList;
intermediary field_28743
Lnet/minecraft/class_5817;field_28743:Lit/unimi/dsi/fastutil/objects/ObjectList;
named junctions
Lnet/minecraft/world/gen/StructureWeightSampler;junctions:Lit/unimi/dsi/fastutil/objects/ObjectList;
-
pieceIterator
- Mappings:
Namespace Name Mixin selector official j
Lctj;j:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
intermediary field_28744
Lnet/minecraft/class_5817;field_28744:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
named pieceIterator
Lnet/minecraft/world/gen/StructureWeightSampler;pieceIterator:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
-
junctionIterator
- Mappings:
Namespace Name Mixin selector official k
Lctj;k:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
intermediary field_28745
Lnet/minecraft/class_5817;field_28745:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
named junctionIterator
Lnet/minecraft/world/gen/StructureWeightSampler;junctionIterator:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
-
-
Constructor Details
-
StructureWeightSampler
- Mappings:
Namespace Name Mixin selector official <init>
Lctj;<init>(Lcbm;Lcqq;)V
intermediary <init>
Lnet/minecraft/class_5817;<init>(Lnet/minecraft/class_5138;Lnet/minecraft/class_2791;)V
named <init>
Lnet/minecraft/world/gen/StructureWeightSampler;<init>(Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/chunk/Chunk;)V
-
-
Method Details
-
sample
- Specified by:
sample
in interfaceDensityFunction
- Mappings:
Namespace Name Mixin selector official a
Lctp;a(Lctp$b;)D
intermediary method_40464
Lnet/minecraft/class_6910;method_40464(Lnet/minecraft/class_6910$class_6912;)D
named sample
Lnet/minecraft/world/gen/densityfunction/DensityFunction;sample(Lnet/minecraft/world/gen/densityfunction/DensityFunction$NoisePos;)D
-
minValue
public double minValue()- Specified by:
minValue
in interfaceDensityFunction
- Mappings:
Namespace Name Mixin selector official a
Lctp;a()D
intermediary comp_377
Lnet/minecraft/class_6910;comp_377()D
named minValue
Lnet/minecraft/world/gen/densityfunction/DensityFunction;minValue()D
-
maxValue
public double maxValue()- Specified by:
maxValue
in interfaceDensityFunction
- Mappings:
Namespace Name Mixin selector official b
Lctp;b()D
intermediary comp_378
Lnet/minecraft/class_6910;comp_378()D
named maxValue
Lnet/minecraft/world/gen/densityfunction/DensityFunction;maxValue()D
-
getMagnitudeWeight
private static double getMagnitudeWeight(int x, int y, int z) - Mappings:
Namespace Name Mixin selector official a
Lctj;a(III)D
intermediary method_33832
Lnet/minecraft/class_5817;method_33832(III)D
named getMagnitudeWeight
Lnet/minecraft/world/gen/StructureWeightSampler;getMagnitudeWeight(III)D
-
getStructureWeight
private static double getStructureWeight(int x, int y, int z) Gets the structure weight from the array from the given position, or 0 if the position is out of bounds.- Mappings:
Namespace Name Mixin selector official b
Lctj;b(III)D
intermediary method_33641
Lnet/minecraft/class_5817;method_33641(III)D
named getStructureWeight
Lnet/minecraft/world/gen/StructureWeightSampler;getStructureWeight(III)D
-
calculateStructureWeight
private static double calculateStructureWeight(int x, int y, int z) Calculates the structure weight for the given position.The weight increases as x and z approach
(0, 0)
, and positive y values make the weight negative while negative y values make the weight positive.- Mappings:
Namespace Name Mixin selector official c
Lctj;c(III)D
intermediary method_33642
Lnet/minecraft/class_5817;method_33642(III)D
named calculateStructureWeight
Lnet/minecraft/world/gen/StructureWeightSampler;calculateStructureWeight(III)D
-