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<TerrainShaper.PointCustom> spline, double minValue, double maxValue)
extends Record
implements DensityFunction
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DensityFunctions.Spline>private static final com.mojang.serialization.MapCodec<DensityFunctions.Spline>private final doubleThe field for themaxValuerecord component.private final doubleThe field for theminValuerecord component.private final CubicSpline<TerrainShaper.PointCustom>The field for thesplinerecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsConstructorDescriptionSpline(CubicSpline<TerrainShaper.PointCustom> spline, double minValue, double maxValue) Creates an instance of aSplinerecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends DensityFunction>codec()doublecompute(DensityFunction.FunctionContext p_211715_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_211722_, DensityFunction.ContextProvider p_211723_) final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor p_211717_) doublemaxValue()Returns the value of themaxValuerecord component.doubleminValue()Returns the value of theminValuerecord component.spline()Returns the value of thesplinerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctionabs, clamp, cube, halfNegative, quarterNegative, square, squeeze
- 
Field Details- 
splineThe field for thesplinerecord component.
- 
minValueprivate final double minValueThe field for theminValuerecord component.
- 
maxValueprivate final double maxValueThe field for themaxValuerecord component.
- 
DATA_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
SplineCreates an instance of aSplinerecord class.- Parameters:
- spline- the value for the- splinerecord component
- minValue- the value for the- minValuerecord component
- maxValue- the value for the- maxValuerecord component
 
 
- 
- 
Method Details- 
compute- Specified by:
- computein interface- DensityFunction
 
- 
fillArray- Specified by:
- fillArrayin interface- DensityFunction
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
codec- Specified by:
- codecin interface- DensityFunction
 
- 
minValuepublic double minValue()Returns the value of theminValuerecord component.- Specified by:
- minValuein interface- DensityFunction
- Returns:
- the value of the minValuerecord component
 
- 
maxValuepublic double maxValue()Returns the value of themaxValuerecord component.- Specified by:
- maxValuein interface- DensityFunction
- Returns:
- the value of the maxValuerecord component
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
splineReturns the value of thesplinerecord component.- Returns:
- the value of the splinerecord component
 
 
-