Record Class DensityFunctions.ShiftedNoise
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.ShiftedNoise
- All Implemented Interfaces:
DensityFunction
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.ShiftedNoise(DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ, double xzScale, double yScale, Holder<NormalNoise.NoiseParameters> noiseData, @Nullable NormalNoise noise)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DensityFunctions.ShiftedNoise>
private static final com.mojang.serialization.MapCodec<DensityFunctions.ShiftedNoise>
private final NormalNoise
The field for thenoise
record component.private final Holder<NormalNoise.NoiseParameters>
The field for thenoiseData
record component.private final DensityFunction
The field for theshiftX
record component.private final DensityFunction
The field for theshiftY
record component.private final DensityFunction
The field for theshiftZ
record component.private final double
The field for thexzScale
record component.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
ShiftedNoise
(DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ, double xzScale, double yScale, Holder<NormalNoise.NoiseParameters> noiseData, NormalNoise noise) Creates an instance of aShiftedNoise
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends DensityFunction>
codec()
double
compute
(DensityFunction.FunctionContext p_208945_) createUnseeded
(DensityFunction p_208949_, DensityFunction p_208950_, DensityFunction p_208951_, double p_208952_, double p_208953_, Holder<NormalNoise.NoiseParameters> p_208954_) final boolean
Indicates whether some other object is "equal to" this one.void
fillArray
(double[] p_208956_, DensityFunction.ContextProvider p_208957_) final int
hashCode()
Returns a hash code value for this object.mapAll
(DensityFunction.Visitor p_208947_) double
maxValue()
double
minValue()
noise()
Returns the value of thenoise
record component.Returns the value of thenoiseData
record component.shiftX()
Returns the value of theshiftX
record component.shiftY()
Returns the value of theshiftY
record component.shiftZ()
Returns the value of theshiftZ
record component.final String
toString()
Returns a string representation of this record class.double
xzScale()
Returns the value of thexzScale
record component.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
-
shiftX
The field for theshiftX
record component. -
shiftY
The field for theshiftY
record component. -
shiftZ
The field for theshiftZ
record component. -
xzScale
private final double xzScaleThe field for thexzScale
record component. -
yScale
private final double yScaleThe field for theyScale
record component. -
noiseData
The field for thenoiseData
record component. -
noise
The field for thenoise
record component. -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
ShiftedNoise
protected ShiftedNoise(DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ, double xzScale, double yScale, Holder<NormalNoise.NoiseParameters> noiseData, @Nullable NormalNoise noise) Creates an instance of aShiftedNoise
record class.- Parameters:
shiftX
- the value for theshiftX
record componentshiftY
- the value for theshiftY
record componentshiftZ
- the value for theshiftZ
record componentxzScale
- the value for thexzScale
record componentyScale
- the value for theyScale
record componentnoiseData
- the value for thenoiseData
record componentnoise
- the value for thenoise
record component
-
-
Method Details
-
createUnseeded
public static DensityFunctions.ShiftedNoise createUnseeded(DensityFunction p_208949_, DensityFunction p_208950_, DensityFunction p_208951_, double p_208952_, double p_208953_, Holder<NormalNoise.NoiseParameters> p_208954_) -
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 '=='. -
shiftX
Returns the value of theshiftX
record component.- Returns:
- the value of the
shiftX
record component
-
shiftY
Returns the value of theshiftY
record component.- Returns:
- the value of the
shiftY
record component
-
shiftZ
Returns the value of theshiftZ
record component.- Returns:
- the value of the
shiftZ
record component
-
xzScale
public double xzScale()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
-
noiseData
Returns the value of thenoiseData
record component.- Returns:
- the value of the
noiseData
record component
-
noise
Returns the value of thenoise
record component.- Returns:
- the value of the
noise
record component
-