Record Class DensityFunctions.HolderHolder
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.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.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<DensityFunction> The field for thefunctionrecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, CODEC, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionHolderHolder(Holder<DensityFunction> function) Creates an instance of aHolderHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<DensityFunctions.HolderHolder> codec()intfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.range()rewriteChildren(DfRewriteRule rule) final StringtoString()Returns a string representation of this record class.
-
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
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin interfaceDensityFunction
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin 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
-