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 x, int z) final booleanIndicates whether some other object is "equal to" this one.static intgetX(long pos) static intgetZ(long pos) 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 x, int z) -
getX
public static int getX(long pos) -
getZ
public static int getZ(long pos) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-