Record Class DensityFunctions.Noise
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Noise
- All Implemented Interfaces:
- DensityFunction
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.Noise(DensityFunction.NoiseHolder noise, double xzScale, double yScale)
extends Record
implements DensityFunction
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.Noise>static final com.mojang.serialization.MapCodec<DensityFunctions.Noise>private final DensityFunction.NoiseHolderThe field for thenoiserecord component.private final doubleDeprecated.private final doubleThe field for theyScalerecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedNoise(DensityFunction.NoiseHolder noise, double xzScale, double yScale) Creates an instance of aNoiserecord class.
- 
Method SummaryModifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>codec()doublecompute(DensityFunction.FunctionContext p_208800_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_224079_, DensityFunction.ContextProvider p_224080_) final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor p_224077_) doublemaxValue()doubleminValue()noise()Returns the value of thenoiserecord component.final StringtoString()Returns a string representation of this record class.doublexzScale()Deprecated.doubleyScale()Returns the value of theyScalerecord component.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctionabs, clamp, cube, halfNegative, quarterNegative, square, squeeze
- 
Field Details- 
noiseThe field for thenoiserecord component.
- 
xzScaleDeprecated.The field for thexzScalerecord component.
- 
yScaleprivate final double yScaleThe field for theyScalerecord component.
- 
DATA_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
NoiseCreates an instance of aNoiserecord class.- Parameters:
- noise- the value for the- noiserecord component
- xzScale- the value for the- xzScalerecord component
- yScale- the value for the- yScalerecord component
 
 
- 
- 
Method Details- 
compute- Specified by:
- computein interface- DensityFunction
 
- 
fillArray- Specified by:
- fillArrayin interface- DensityFunction
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
minValuepublic double minValue()- Specified by:
- minValuein interface- DensityFunction
 
- 
maxValuepublic double maxValue()- Specified by:
- maxValuein interface- DensityFunction
 
- 
codec- Specified by:
- codecin interface- DensityFunction
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
noiseReturns the value of thenoiserecord component.- Returns:
- the value of the noiserecord component
 
- 
xzScaleDeprecated.Returns the value of thexzScalerecord component.- Returns:
- the value of the xzScalerecord component
 
- 
yScalepublic double yScale()Returns the value of theyScalerecord component.- Returns:
- the value of the yScalerecord component
 
 
-