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, DensityFunction.NoiseHolder 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.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.ShiftedNoise> private static final com.mojang.serialization.MapCodec<DensityFunctions.ShiftedNoise> private final DensityFunction.NoiseHolderThe field for thenoiserecord component.private final DensityFunctionThe field for theshiftXrecord component.private final DensityFunctionThe field for theshiftYrecord component.private final DensityFunctionThe field for theshiftZrecord component.private final doubleThe field for thexzScalerecord component.private final doubleThe field for theyScalerecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedShiftedNoise(DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ, double xzScale, double yScale, DensityFunction.NoiseHolder noise) Creates an instance of aShiftedNoiserecord class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction> codec()doublecompute(DensityFunction.FunctionContext p_208945_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_208956_, DensityFunction.ContextProvider p_208957_) final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor p_208947_) doublemaxValue()doubleminValue()noise()Returns the value of thenoiserecord component.shiftX()Returns the value of theshiftXrecord component.shiftY()Returns the value of theshiftYrecord component.shiftZ()Returns the value of theshiftZrecord component.final StringtoString()Returns a string representation of this record class.doublexzScale()Returns the value of thexzScalerecord component.doubleyScale()Returns the value of theyScalerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeeze
-
Field Details
-
shiftX
The field for theshiftXrecord component. -
shiftY
The field for theshiftYrecord component. -
shiftZ
The field for theshiftZrecord component. -
xzScale
private final double xzScaleThe field for thexzScalerecord component. -
yScale
private final double yScaleThe field for theyScalerecord component. -
noise
The field for thenoiserecord component. -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
ShiftedNoise
protected ShiftedNoise(DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ, double xzScale, double yScale, DensityFunction.NoiseHolder noise) Creates an instance of aShiftedNoiserecord class.- Parameters:
shiftX- the value for theshiftXrecord componentshiftY- the value for theshiftYrecord componentshiftZ- the value for theshiftZrecord componentxzScale- the value for thexzScalerecord componentyScale- the value for theyScalerecord componentnoise- the value for thenoiserecord 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
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 theshiftXrecord component.- Returns:
- the value of the
shiftXrecord component
-
shiftY
Returns the value of theshiftYrecord component.- Returns:
- the value of the
shiftYrecord component
-
shiftZ
Returns the value of theshiftZrecord component.- Returns:
- the value of the
shiftZrecord component
-
xzScale
public double xzScale()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
-
noise
Returns the value of thenoiserecord component.- Returns:
- the value of the
noiserecord component
-