Record Class DensityFunction.SinglePointContext
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunction.SinglePointContext
- All Implemented Interfaces:
DensityFunction.FunctionContext
- Enclosing interface:
- DensityFunction
public static record DensityFunction.SinglePointContext(int blockX, int blockY, int blockZ)
extends Record
implements DensityFunction.FunctionContext
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSinglePointContext
(int blockX, int blockY, int blockZ) Creates an instance of aSinglePointContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
blockX()
Returns the value of theblockX
record component.int
blockY()
Returns the value of theblockY
record component.int
blockZ()
Returns the value of theblockZ
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
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.world.level.levelgen.DensityFunction.FunctionContext
getBlender
-
Field Details
-
blockX
private final int blockXThe field for theblockX
record component. -
blockY
private final int blockYThe field for theblockY
record component. -
blockZ
private final int blockZThe field for theblockZ
record component.
-
-
Constructor Details
-
SinglePointContext
public SinglePointContext(int blockX, int blockY, int blockZ) Creates an instance of aSinglePointContext
record class.- Parameters:
blockX
- the value for theblockX
record componentblockY
- the value for theblockY
record componentblockZ
- the value for theblockZ
record component
-
-
Method Details
-
blockX
public int blockX()Returns the value of theblockX
record component.- Specified by:
blockX
in interfaceDensityFunction.FunctionContext
- Returns:
- the value of the
blockX
record component
-
blockY
public int blockY()Returns the value of theblockY
record component.- Specified by:
blockY
in interfaceDensityFunction.FunctionContext
- Returns:
- the value of the
blockY
record component
-
blockZ
public int blockZ()Returns the value of theblockZ
record component.- Specified by:
blockZ
in interfaceDensityFunction.FunctionContext
- Returns:
- the value of the
blockZ
record component
-
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 with '=='.
-