Package net.minecraft.world.gen
Class StructureWeightSampler
java.lang.Object
net.minecraft.world.gen.StructureWeightSampler
- All Implemented Interfaces:
- DensityFunction,- DensityFunction.Base,- DensityFunctionTypes.Beardifying
Applies weights to noise values if they are near structures, placing terrain under them and hollowing out the space above them.
- Mappings:
- Namespace - Name - named - net/minecraft/world/gen/StructureWeightSampler- intermediary - net/minecraft/class_5817- official - ecg
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionDensityFunction.Base, DensityFunction.DensityFunctionVisitor, DensityFunction.EachApplier, DensityFunction.Noise, DensityFunction.NoisePos, DensityFunction.UnblendedNoisePos
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intstatic final intprivate final ObjectListIterator<JigsawJunction> private final ObjectListIterator<StructureWeightSampler.Piece> private static final float[]Fields inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionCODEC, FUNCTION_CODEC, REGISTRY_ENTRY_CODECFields inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionTypes.BeardifyingCODEC_HOLDER
- 
Constructor SummaryConstructorsConstructorDescriptionStructureWeightSampler(ObjectListIterator<StructureWeightSampler.Piece> pieceIterator, ObjectListIterator<JigsawJunction> junctionIterator) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate static doublecalculateStructureWeight(int x, int y, int z) Calculates the structure weight for the given position.static StructureWeightSamplercreateStructureWeightSampler(StructureAccessor world, ChunkPos pos) private static doublegetMagnitudeWeight(double x, double y, double z) private static doublegetStructureWeight(int x, int y, int z, int yy) Gets the structure weight from the array from the given position, or 0 if the position is out of bounds.private static booleanindexInBounds(int i) doublemaxValue()doubleminValue()doubleReturns the density value for the given block position.private static doublestructureWeight(int x, double y, int z) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionabs, clamp, cube, halfNegative, quarterNegative, square, squeezeMethods inherited from interface net.minecraft.world.gen.densityfunction.DensityFunction.Baseapply, fillMethods inherited from interface net.minecraft.world.gen.densityfunction.DensityFunctionTypes.BeardifyinggetCodecHolder
- 
Field Details- 
INDEX_OFFSETpublic static final int INDEX_OFFSET- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - INDEX_OFFSET- Lnet/minecraft/world/gen/StructureWeightSampler;INDEX_OFFSET:I- intermediary - field_31461- Lnet/minecraft/class_5817;field_31461:I- official - a- Lecg;a:I
 
- 
EDGE_LENGTHprivate static final int EDGE_LENGTH- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - EDGE_LENGTH- Lnet/minecraft/world/gen/StructureWeightSampler;EDGE_LENGTH:I- intermediary - field_31462- Lnet/minecraft/class_5817;field_31462:I- official - f- Lecg;f:I
 
- 
STRUCTURE_WEIGHT_TABLEprivate static final float[] STRUCTURE_WEIGHT_TABLE- Mappings:
- Namespace - Name - Mixin selector - named - STRUCTURE_WEIGHT_TABLE- Lnet/minecraft/world/gen/StructureWeightSampler;STRUCTURE_WEIGHT_TABLE:[F- intermediary - field_28741- Lnet/minecraft/class_5817;field_28741:[F- official - g- Lecg;g:[F
 
- 
pieceIterator- Mappings:
- Namespace - Name - Mixin selector - named - pieceIterator- Lnet/minecraft/world/gen/StructureWeightSampler;pieceIterator:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;- intermediary - field_28744- Lnet/minecraft/class_5817;field_28744:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;- official - h- Lecg;h:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
 
- 
junctionIterator- Mappings:
- Namespace - Name - Mixin selector - named - junctionIterator- Lnet/minecraft/world/gen/StructureWeightSampler;junctionIterator:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;- intermediary - field_28745- Lnet/minecraft/class_5817;field_28745:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;- official - i- Lecg;i:Lit/unimi/dsi/fastutil/objects/ObjectListIterator;
 
 
- 
- 
Constructor Details- 
StructureWeightSamplerpublic StructureWeightSampler(ObjectListIterator<StructureWeightSampler.Piece> pieceIterator, ObjectListIterator<JigsawJunction> junctionIterator) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/world/gen/StructureWeightSampler;<init>(Lit/unimi/dsi/fastutil/objects/ObjectListIterator;Lit/unimi/dsi/fastutil/objects/ObjectListIterator;)V- intermediary - <init>- Lnet/minecraft/class_5817;<init>(Lit/unimi/dsi/fastutil/objects/ObjectListIterator;Lit/unimi/dsi/fastutil/objects/ObjectListIterator;)V- official - <init>- Lecg;<init>(Lit/unimi/dsi/fastutil/objects/ObjectListIterator;Lit/unimi/dsi/fastutil/objects/ObjectListIterator;)V
 
 
- 
- 
Method Details- 
createStructureWeightSamplerpublic static StructureWeightSampler createStructureWeightSampler(StructureAccessor world, ChunkPos pos) - Mappings:
- Namespace - Name - Mixin selector - named - createStructureWeightSampler- Lnet/minecraft/world/gen/StructureWeightSampler;createStructureWeightSampler(Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/util/math/ChunkPos;)Lnet/minecraft/world/gen/StructureWeightSampler;- intermediary - method_42695- Lnet/minecraft/class_5817;method_42695(Lnet/minecraft/class_5138;Lnet/minecraft/class_1923;)Lnet/minecraft/class_5817;- official - a- Lecg;a(Ldhf;Ldfp;)Lecg;
 
- 
sampleReturns the density value for the given block position.- Specified by:
- samplein interface- DensityFunction
- Parameters:
- pos- the block position
- Returns:
- the density value for the given block position
- Mappings:
- Namespace - Name - Mixin selector - named - sample- Lnet/minecraft/world/gen/densityfunction/DensityFunction;sample(Lnet/minecraft/world/gen/densityfunction/DensityFunction$NoisePos;)D- intermediary - method_40464- Lnet/minecraft/class_6910;method_40464(Lnet/minecraft/class_6910$class_6912;)D- official - a- Lecm;a(Lecm$b;)D
 
- 
minValuepublic double minValue()- Specified by:
- minValuein interface- DensityFunction
- Mappings:
- Namespace - Name - Mixin selector - named - minValue- Lnet/minecraft/world/gen/densityfunction/DensityFunction;minValue()D- intermediary - comp_377- Lnet/minecraft/class_6910;comp_377()D- official - a- Lecm;a()D
 
- 
maxValuepublic double maxValue()- Specified by:
- maxValuein interface- DensityFunction
- Mappings:
- Namespace - Name - Mixin selector - named - maxValue- Lnet/minecraft/world/gen/densityfunction/DensityFunction;maxValue()D- intermediary - comp_378- Lnet/minecraft/class_6910;comp_378()D- official - b- Lecm;b()D
 
- 
getMagnitudeWeightprivate static double getMagnitudeWeight(double x, double y, double z) - Mappings:
- Namespace - Name - Mixin selector - named - getMagnitudeWeight- Lnet/minecraft/world/gen/StructureWeightSampler;getMagnitudeWeight(DDD)D- intermediary - method_33832- Lnet/minecraft/class_5817;method_33832(DDD)D- official - a- Lecg;a(DDD)D
 
- 
getStructureWeightprivate static double getStructureWeight(int x, int y, int z, int yy) 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 - named - getStructureWeight- Lnet/minecraft/world/gen/StructureWeightSampler;getStructureWeight(IIII)D- intermediary - method_33641- Lnet/minecraft/class_5817;method_33641(IIII)D- official - a- Lecg;a(IIII)D
 
- 
indexInBoundsprivate static boolean indexInBounds(int i) - Mappings:
- Namespace - Name - Mixin selector - named - indexInBounds- Lnet/minecraft/world/gen/StructureWeightSampler;indexInBounds(I)Z- intermediary - method_42692- Lnet/minecraft/class_5817;method_42692(I)Z- official - a- Lecg;a(I)Z
 
- 
calculateStructureWeightprivate 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 - named - calculateStructureWeight- Lnet/minecraft/world/gen/StructureWeightSampler;calculateStructureWeight(III)D- intermediary - method_33642- Lnet/minecraft/class_5817;method_33642(III)D- official - a- Lecg;a(III)D
 
- 
structureWeightprivate static double structureWeight(int x, double y, int z) - Mappings:
- Namespace - Name - Mixin selector - named - structureWeight- Lnet/minecraft/world/gen/StructureWeightSampler;structureWeight(IDI)D- intermediary - method_42693- Lnet/minecraft/class_5817;method_42693(IDI)D- official - a- Lecg;a(IDI)D
 
 
-