Record Class RoundFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.RoundFunction
- All Implemented Interfaces:
DensityFunction
public record RoundFunction(RoundFunction.Type type, DensityFunction input, DensityFunction multiple)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final recordprivate static 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 DensityFunctionThe field for themultiplerecord component.private final RoundFunction.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
ConstructorsConstructorDescriptionRoundFunction(RoundFunction.Type type, DensityFunction input, DensityFunction multiple) Creates an instance of aRoundFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<RoundFunction> 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.multiple()Returns the value of themultiplerecord component.range()rewriteChildren(DfRewriteRule rule) private static floatroundToInteger(float input, RoundFunction.Type type) 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. -
multiple
The field for themultiplerecord component.
-
-
Constructor Details
-
RoundFunction
Creates an instance of aRoundFunctionrecord class.- Parameters:
type- the value for thetyperecord componentinput- the value for theinputrecord componentmultiple- the value for themultiplerecord component
-
-
Method Details
-
roundToInteger
-
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). -
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
-
multiple
Returns the value of themultiplerecord component.- Returns:
- the value of the
multiplerecord component
-