Package net.minecraft.world.level.biome
Record Class TerrainShaper.CoordinateCustom
java.lang.Object
java.lang.Record
net.minecraft.world.level.biome.TerrainShaper.CoordinateCustom
- All Implemented Interfaces:
ToFloatFunction<TerrainShaper.PointCustom>
- Enclosing class:
- TerrainShaper
public static record TerrainShaper.CoordinateCustom(Holder<DensityFunction> function)
extends Record
implements ToFloatFunction<TerrainShaper.PointCustom>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Holder<DensityFunction>
The field for thefunction
record component.(package private) static final com.mojang.serialization.Codec<ToFloatFunction<TerrainShaper.PointCustom>>
-
Constructor Summary
ConstructorDescriptionCoordinateCustom
(Holder<DensityFunction> function) Creates an instance of aCoordinateCustom
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
apply
(TerrainShaper.PointCustom p_211610_) 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_211612_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
function
The field for thefunction
record component. -
WIDE_CODEC
-
-
Constructor Details
-
CoordinateCustom
Creates an instance of aCoordinateCustom
record class.- Parameters:
function
- the value for thefunction
record component
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceToFloatFunction<TerrainShaper.PointCustom>
-
mapAll
-
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. -
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
-