Record Class Vector
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.Vector
-
Constructor Summary
ConstructorDescriptionVector
(int blockX, int blockY, int blockZ) Creates an instance of aVector
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.
-
Constructor Details
-
Vector
public Vector(int blockX, int blockY, int blockZ) Creates an instance of aVector
record class.- Parameters:
blockX
- the value for theblockX
record componentblockY
- the value for theblockY
record componentblockZ
- the value for theblockZ
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. -
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 '=='. -
blockX
public int blockX()Returns the value of theblockX
record component.- Returns:
- the value of the
blockX
record component
-
blockY
public int blockY()Returns the value of theblockY
record component.- Returns:
- the value of the
blockY
record component
-
blockZ
public int blockZ()Returns the value of theblockZ
record component.- Returns:
- the value of the
blockZ
record component
-