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 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.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.DensityFunctionDIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedShiftedNoise(DensityFunction shiftX, DensityFunction shiftY, DensityFunction shiftZ, double xzScale, double yScale, DensityFunction.NoiseHolder noise) Creates an instance of aShiftedNoiserecord class.
- 
Method SummaryModifier 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.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- 
shiftXThe field for theshiftXrecord component.
- 
shiftYThe field for theshiftYrecord component.
- 
shiftZThe field for theshiftZrecord component.
- 
xzScaleprivate final double xzScaleThe field for thexzScalerecord component.
- 
yScaleprivate final double yScaleThe field for theyScalerecord component.
- 
noiseThe field for thenoiserecord component.
- 
DATA_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
ShiftedNoiseprotected 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 the- shiftXrecord component
- shiftY- the value for the- shiftYrecord component
- shiftZ- the value for the- shiftZrecord component
- xzScale- the value for the- xzScalerecord component
- yScale- the value for the- yScalerecord component
- noise- the value for the- noiserecord 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 '=='.
- 
shiftXReturns the value of theshiftXrecord component.- Returns:
- the value of the shiftXrecord component
 
- 
shiftYReturns the value of theshiftYrecord component.- Returns:
- the value of the shiftYrecord component
 
- 
shiftZReturns the value of theshiftZrecord component.- Returns:
- the value of the shiftZrecord component
 
- 
xzScalepublic double xzScale()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
 
- 
noiseReturns the value of thenoiserecord component.- Returns:
- the value of the noiserecord component
 
 
-