Record Class DensityFunctions.HolderHolder
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.HolderHolder
- All Implemented Interfaces:
DensityFunction
- Enclosing class:
- DensityFunctions
public static record DensityFunctions.HolderHolder(Holder<DensityFunction> function)
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
Modifier and TypeFieldDescriptionprivate final Holder<DensityFunction>
The field for thefunction
record component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODEC
-
Constructor Summary
ConstructorDescriptionHolderHolder
(Holder<DensityFunction> function) Creates an instance of aHolderHolder
record class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>
codec()
double
compute
(DensityFunction.FunctionContext p_208641_) final boolean
Indicates whether some other object is "equal to" this one.void
fillArray
(double[] p_208645_, DensityFunction.ContextProvider p_208646_) function()
Returns the value of thefunction
record component.final int
hashCode()
Returns a hash code value for this object.mapAll
(DensityFunction.Visitor p_208643_) double
maxValue()
double
minValue()
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
-
Field Details
-
function
The field for thefunction
record component.
-
-
Constructor Details
-
HolderHolder
Creates an instance of aHolderHolder
record class.- Parameters:
function
- the value for thefunction
record component
-
-
Method Details
-
compute
- Specified by:
compute
in interfaceDensityFunction
-
fillArray
- Specified by:
fillArray
in interfaceDensityFunction
-
mapAll
- Specified by:
mapAll
in interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValue
in interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValue
in interfaceDensityFunction
-
codec
- Specified by:
codec
in 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
function
Returns the value of thefunction
record component.- Returns:
- the value of the
function
record component
-