Record Class DensityFunctions.Spline.Coordinate
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Spline.Coordinate
- All Implemented Interfaces:
ToFloatFunction<DensityFunctions.Spline.Point>
- Enclosing class:
DensityFunctions.Spline
public static record DensityFunctions.Spline.Coordinate(Holder<DensityFunction> function)
extends Record
implements ToFloatFunction<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 net.minecraft.util.ToFloatFunction
IDENTITY -
Constructor Summary
ConstructorsConstructorDescriptionCoordinate(Holder<DensityFunction> function) Creates an instance of aCoordinaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatapply(DensityFunctions.Spline.Point p_224130_) final 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 p_224128_) floatmaxValue()floatminValue()toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.ToFloatFunction
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
Returns 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. -
apply
- Specified by:
applyin interfaceToFloatFunction<DensityFunctions.Spline.Point>
-
minValue
public float minValue()- Specified by:
minValuein interfaceToFloatFunction<DensityFunctions.Spline.Point>
-
maxValue
public float maxValue()- Specified by:
maxValuein interfaceToFloatFunction<DensityFunctions.Spline.Point>
-
mapAll
-
hashCode
public 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. -
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
-