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 net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
-
Field Summary
Modifier and TypeFieldDescription(package private) static final KeyDispatchDataCodec
<DensityFunctions.Shift> private final DensityFunction.NoiseHolder
The field for theoffsetNoise
record component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC
-
Constructor Summary
ModifierConstructorDescriptionprotected
Shift
(DensityFunction.NoiseHolder offsetNoise) Creates an instance of aShift
record class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec
<? extends DensityFunction> codec()
double
compute
(DensityFunction.FunctionContext p_208864_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.mapAll
(DensityFunction.Visitor p_224087_) Returns the value of theoffsetNoise
record component.final String
toString()
Returns a string representation of this record class.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
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.ShiftNoise
compute, fillArray, maxValue, minValue
-
Field Details
-
offsetNoise
The field for theoffsetNoise
record component. -
CODEC
-
-
Constructor Details
-
Shift
Creates an instance of aShift
record class.- Parameters:
offsetNoise
- the value for theoffsetNoise
record component
-
-
Method Details
-
compute
- Specified by:
compute
in interfaceDensityFunction
-
mapAll
- Specified by:
mapAll
in interfaceDensityFunction
-
codec
- Specified by:
codec
in interfaceDensityFunction
-
offsetNoise
Returns the value of theoffsetNoise
record component.- Specified by:
offsetNoise
in interfaceDensityFunctions.ShiftNoise
- Returns:
- the value of the
offsetNoise
record component
-
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. All components in this record class are compared withObjects::equals(Object,Object)
.
-