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 Summary
Nested classes/interfaces inherited from interface DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier 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 DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNoise(DensityFunction.NoiseHolder noise, double xzScale, double yScale) Creates an instance of aNoiserecord class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction> codec()doublecompute(DensityFunction.FunctionContext context) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] output, DensityFunction.ContextProvider contextProvider) final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor visitor) 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 interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeeze
-
Field Details
-
noise
The field for thenoiserecord component. -
xzScale
-
yScale
private final double yScaleThe field for theyScalerecord component. -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
Noise
Creates an instance of aNoiserecord class.- Parameters:
noise- the value for thenoiserecord componentxzScale- the value for thexzScalerecord componentyScale- the value for theyScalerecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceDensityFunction
-
fillArray
- Specified by:
fillArrayin interfaceDensityFunction
-
mapAll
- Specified by:
mapAllin interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
toString
-
hashCode
-
equals
Indicates 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 thecomparemethod from their corresponding wrapper classes. -
noise
Returns the value of thenoiserecord component.- Returns:
- the value of the
noiserecord component
-
xzScale
Deprecated.Returns the value of thexzScalerecord component.- Returns:
- the value of the
xzScalerecord component
-
yScale
public double yScale()Returns the value of theyScalerecord component.- Returns:
- the value of the
yScalerecord component
-