Record Class SplineFunction
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.SplineFunction
- All Implemented Interfaces:
DensityFunction
public record SplineFunction(CubicSpline<SplineFunction.Coordinate> spline)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic final recordprivate static classprivate static classprivate static final recordprivate static interfaceNested classes/interfaces inherited from interface DensityFunction
DensityFunction.Axes, DensityFunction.CompileContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SplineFunction> private final CubicSpline<SplineFunction.Coordinate> The field for thesplinerecord component.private static final com.mojang.serialization.Codec<CubicSpline<SplineFunction.Coordinate>> Fields inherited from interface DensityFunction
ALL_AXES, AXIS_X, AXIS_Y, AXIS_Z, NO_AXES, REFERENCE_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aSplineFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SplineFunction> codec()intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.range()rewriteChildren(DfRewriteRule rule) spline()Returns the value of thesplinerecord component.toString()Returns a string representation of this record class.
-
Field Details
-
spline
The field for thesplinerecord component. -
SPLINE_CODEC
private static final com.mojang.serialization.Codec<CubicSpline<SplineFunction.Coordinate>> SPLINE_CODEC -
CODEC
-
-
Constructor Details
-
SplineFunction
Creates an instance of aSplineFunctionrecord class.- Parameters:
spline- the value for thesplinerecord component
-
-
Method Details
-
compileSampler
- Specified by:
compileSamplerin interfaceDensityFunction
-
range
- Specified by:
rangein interfaceDensityFunction
-
domainAxes
public int domainAxes()- Specified by:
domainAxesin interfaceDensityFunction
-
rewriteChildren
- Specified by:
rewriteChildrenin 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). -
spline
Returns the value of thesplinerecord component.- Returns:
- the value of the
splinerecord component
-