Package net.minecraft.server.level
Record Class ColumnPos
java.lang.Object
java.lang.Record
net.minecraft.server.level.ColumnPos
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate static final longprivate final intThe field for thexrecord component.private final intThe field for thezrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longasLong(int p_143198_, int p_143199_) final booleanIndicates whether some other object is "equal to" this one.static intgetX(long p_214970_) static intgetZ(long p_214972_) inthashCode()Returns a hash code value for this object.longtoLong()toString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.intz()Returns the value of thezrecord component.
-
Field Details
-
x
private final int xThe field for thexrecord component. -
z
private final int zThe field for thezrecord component. -
COORD_BITS
private static final long COORD_BITS- See Also:
-
COORD_MASK
private static final long COORD_MASK- See Also:
-
-
Constructor Details
-
ColumnPos
public ColumnPos(int x, int z) Creates an instance of aColumnPosrecord class.- Parameters:
x- the value for thexrecord componentz- the value for thezrecord component
-
-
Method Details
-
toChunkPos
-
toLong
public long toLong() -
asLong
public static long asLong(int p_143198_, int p_143199_) -
getX
public static int getX(long p_214970_) -
getZ
public static int getZ(long p_214972_) -
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 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 '=='. -
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-