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 net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
-
Field Summary
Modifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.Noise>
static final com.mojang.serialization.MapCodec<DensityFunctions.Noise>
private final DensityFunction.NoiseHolder
The field for thenoise
record component.private final double
Deprecated.private final double
The field for theyScale
record component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC
-
Constructor Summary
ModifierConstructorDescriptionprotected
Noise
(DensityFunction.NoiseHolder noise, double xzScale, double yScale) Creates an instance of aNoise
record class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>
codec()
double
compute
(DensityFunction.FunctionContext p_208800_) final boolean
Indicates whether some other object is "equal to" this one.void
fillArray
(double[] p_224079_, DensityFunction.ContextProvider p_224080_) final int
hashCode()
Returns a hash code value for this object.mapAll
(DensityFunction.Visitor p_224077_) double
maxValue()
double
minValue()
noise()
Returns the value of thenoise
record component.final String
toString()
Returns a string representation of this record class.double
xzScale()
Deprecated.double
yScale()
Returns the value of theyScale
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeeze
-
Field Details
-
noise
The field for thenoise
record component. -
xzScale
Deprecated.The field for thexzScale
record component. -
yScale
private final double yScaleThe field for theyScale
record component. -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
Noise
Creates an instance of aNoise
record class.- Parameters:
noise
- the value for thenoise
record componentxzScale
- the value for thexzScale
record componentyScale
- the value for theyScale
record component
-
-
Method Details
-
compute
- Specified by:
compute
in interfaceDensityFunction
-
fillArray
- Specified by:
fillArray
in interfaceDensityFunction
-
mapAll
- Specified by:
mapAll
in interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValue
in interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValue
in interfaceDensityFunction
-
codec
- Specified by:
codec
in interfaceDensityFunction
-
toString
Returns 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. -
hashCode
public 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. -
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 '=='. -
noise
Returns the value of thenoise
record component.- Returns:
- the value of the
noise
record component
-
xzScale
Deprecated.Returns the value of thexzScale
record component.- Returns:
- the value of the
xzScale
record component
-
yScale
public double yScale()Returns the value of theyScale
record component.- Returns:
- the value of the
yScale
record component
-