Record Class DensityFunctions.Shift
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Shift
- All Implemented Interfaces:
- DensityFunction,- DensityFunctions.ShiftNoise
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.Shift(DensityFunction.NoiseHolder offsetNoise)
extends Record
implements DensityFunctions.ShiftNoise
- 
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 TypeFieldDescription(package private) static final KeyDispatchDataCodec<DensityFunctions.Shift>private final DensityFunction.NoiseHolderThe field for theoffsetNoiserecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedShift(DensityFunction.NoiseHolder offsetNoise) Creates an instance of aShiftrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>codec()doublecompute(DensityFunction.FunctionContext p_208864_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor p_224087_) Returns the value of theoffsetNoiserecord component.final StringtoString()Returns a string representation of this record class.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, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.ShiftNoisecompute, fillArray, maxValue, minValue
- 
Field Details- 
offsetNoiseThe field for theoffsetNoiserecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
ShiftCreates an instance of aShiftrecord class.- Parameters:
- offsetNoise- the value for the- offsetNoiserecord component
 
 
- 
- 
Method Details- 
compute- Specified by:
- computein interface- DensityFunction
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
codec- Specified by:
- codecin interface- DensityFunction
 
- 
offsetNoiseReturns the value of theoffsetNoiserecord component.- Specified by:
- offsetNoisein interface- DensityFunctions.ShiftNoise
- Returns:
- the value of the offsetNoiserecord component
 
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
 
-