Record Class DensityFunctions.Spline
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Spline
- All Implemented Interfaces:
DensityFunction
- Enclosing class:
DensityFunctions
public static record DensityFunctions.Spline(CubicSpline<DensityFunctions.Spline.Point, DensityFunctions.Spline.Coordinate> spline)
extends Record
implements DensityFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordNested classes/interfaces inherited from interface DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.Spline> private static final com.mojang.serialization.MapCodec<DensityFunctions.Spline> The field for thesplinerecord component.private static final com.mojang.serialization.Codec<CubicSpline<DensityFunctions.Spline.Point, DensityFunctions.Spline.Coordinate>> Fields inherited from interface DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aSplinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction> codec()doublecompute(DensityFunction.FunctionContext context) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] output, DensityFunction.ContextProvider contextProvider) final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor visitor) doublemaxValue()doubleminValue()spline()Returns the value of thesplinerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeeze
-
Field Details
-
spline
The field for thesplinerecord component. -
SPLINE_CODEC
private static final com.mojang.serialization.Codec<CubicSpline<DensityFunctions.Spline.Point, DensityFunctions.Spline.Coordinate>> SPLINE_CODEC -
DATA_CODEC
-
CODEC
-
-
Constructor Details
-
Spline
public Spline(CubicSpline<DensityFunctions.Spline.Point, DensityFunctions.Spline.Coordinate> spline) Creates an instance of aSplinerecord class.- Parameters:
spline- the value for thesplinerecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein interfaceDensityFunction
-
fillArray
- Specified by:
fillArrayin interfaceDensityFunction
-
mapAll
- Specified by:
mapAllin 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
-