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 DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<DensityFunction> The field for thefunctionrecord component.Fields inherited from interface DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionHolderHolder(Holder<DensityFunction> function) Creates an instance of aHolderHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction> codec()doublecompute(DensityFunction.FunctionContext context) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] output, DensityFunction.ContextProvider contextProvider) function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor visitor) doublemaxValue()doubleminValue()final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeeze
-
Field Details
-
function
The field for thefunctionrecord component.
-
-
Constructor Details
-
HolderHolder
Creates an instance of aHolderHolderrecord class.- Parameters:
function- the value for thefunctionrecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceDensityFunction
-
fillArray
- Specified by:
fillArrayin interfaceDensityFunction
-
mapAll
- Specified by:
mapAllin interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein 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). -
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-