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 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 TypeFieldDescriptionprivate final Holder<DensityFunction>The field for thefunctionrecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionCODEC, DIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsConstructorDescriptionHolderHolder(Holder<DensityFunction> function) Creates an instance of aHolderHolderrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>codec()doublecompute(DensityFunction.FunctionContext p_208641_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_208645_, DensityFunction.ContextProvider p_208646_) function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor p_208643_) doublemaxValue()doubleminValue()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, squeeze
- 
Field Details- 
functionThe field for thefunctionrecord component.
 
- 
- 
Constructor Details- 
HolderHolderCreates an instance of aHolderHolderrecord class.- Parameters:
- function- the value for the- functionrecord component
 
 
- 
- 
Method Details- 
compute- Specified by:
- computein interface- DensityFunction
 
- 
fillArray- Specified by:
- fillArrayin interface- DensityFunction
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
minValuepublic double minValue()- Specified by:
- minValuein interface- DensityFunction
 
- 
maxValuepublic double maxValue()- Specified by:
- maxValuein interface- DensityFunction
 
- 
codec- Specified by:
- codecin interface- DensityFunction
 
- 
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).
- 
functionReturns the value of thefunctionrecord component.- Returns:
- the value of the functionrecord component
 
 
-