Record Class DensityFunctions.Spline.Coordinate
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Spline.Coordinate
- All Implemented Interfaces:
BoundedFloatFunction<DensityFunctions.Spline.Point>
- Enclosing class:
DensityFunctions.Spline
public static record DensityFunctions.Spline.Coordinate(Holder<DensityFunction> function)
extends Record
implements BoundedFloatFunction<DensityFunctions.Spline.Point>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DensityFunctions.Spline.Coordinate> private final Holder<DensityFunction> The field for thefunctionrecord component.Fields inherited from interface BoundedFloatFunction
IDENTITY -
Constructor Summary
ConstructorsConstructorDescriptionCoordinate(Holder<DensityFunction> function) Creates an instance of aCoordinaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.mapAll(DensityFunction.Visitor visitor) floatmaxValue()floatminValue()toString()Returns a string representation of this record class.Methods inherited from interface BoundedFloatFunction
comap
-
Field Details
-
function
The field for thefunctionrecord component. -
CODEC
-
-
Constructor Details
-
Coordinate
Creates an instance of aCoordinaterecord class.- Parameters:
function- the value for thefunctionrecord component
-
-
Method Details
-
toString
-
apply
- Specified by:
applyin interfaceBoundedFloatFunction<DensityFunctions.Spline.Point>
-
minValue
public float minValue()- Specified by:
minValuein interfaceBoundedFloatFunction<DensityFunctions.Spline.Point>
-
maxValue
public float maxValue()- Specified by:
maxValuein interfaceBoundedFloatFunction<DensityFunctions.Spline.Point>
-
mapAll
-
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). -
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-