Record Class UnaryFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.UnaryFunction
- All Implemented Interfaces:
DensityFunction
public record UnaryFunction(UnaryFunction.Type type, DensityFunction input)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic enumNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensityFunctionThe field for theinputrecord component.private final UnaryFunction.TypeThe field for thetyperecord component.Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, CODEC, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionUnaryFunction(UnaryFunction.Type type, DensityFunction input) Creates an instance of aUnaryFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<UnaryFunction> codec()intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.range()rewriteChildren(DfRewriteRule rule) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
input
The field for theinputrecord component.
-
-
Constructor Details
-
UnaryFunction
Creates an instance of aUnaryFunctionrecord class.- Parameters:
type- the value for thetyperecord componentinput- the value for theinputrecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin 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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-