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 Summary
Nested classes/interfaces inherited from interface DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final KeyDispatchDataCodec<DensityFunctions.Shift> private final DensityFunction.NoiseHolderThe field for theoffsetNoiserecord component.Fields inherited from interface DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedShift(DensityFunction.NoiseHolder offsetNoise) Creates an instance of aShiftrecord class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction> codec()doublecompute(DensityFunction.FunctionContext context) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor visitor) Returns the value of theoffsetNoiserecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeezeMethods inherited from interface DensityFunctions.ShiftNoise
compute, fillArray, maxValue, minValue
-
Field Details
-
offsetNoise
The field for theoffsetNoiserecord component. -
CODEC
-
-
Constructor Details
-
Shift
Creates an instance of aShiftrecord class.- Parameters:
offsetNoise- the value for theoffsetNoiserecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceDensityFunction
-
mapAll
- Specified by:
mapAllin interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
offsetNoise
Returns the value of theoffsetNoiserecord component.- Specified by:
offsetNoisein interfaceDensityFunctions.ShiftNoise- Returns:
- the value of the
offsetNoiserecord component
-