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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DensityFunctions.Spline.Coordinate>
private final Holder<DensityFunction>
The field for thefunction
record component.Fields inherited from interface net.minecraft.util.ToFloatFunction
IDENTITY
-
Constructor Summary
ConstructorDescriptionCoordinate
(Holder<DensityFunction> function) Creates an instance of aCoordinate
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
apply
(DensityFunctions.Spline.Point p_224130_) final boolean
Indicates whether some other object is "equal to" this one.function()
Returns the value of thefunction
record component.final int
hashCode()
Returns a hash code value for this object.mapAll
(DensityFunction.Visitor p_224128_) float
maxValue()
float
minValue()
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.util.ToFloatFunction
comap
-
Field Details
-
function
The field for thefunction
record component. -
CODEC
-
-
Constructor Details
-
Coordinate
Creates an instance of aCoordinate
record class.- Parameters:
function
- the value for thefunction
record 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:
apply
in interfaceToFloatFunction<DensityFunctions.Spline.Point>
-
minValue
public float minValue()- Specified by:
minValue
in interfaceToFloatFunction<DensityFunctions.Spline.Point>
-
maxValue
public float maxValue()- Specified by:
maxValue
in 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 thefunction
record component.- Returns:
- the value of the
function
record component
-