public class WrappedChunkCoordinate extends AbstractWrapper implements java.lang.Comparable<WrappedChunkCoordinate>
handle, handleType
Constructor and Description |
---|
WrappedChunkCoordinate()
Create a new empty wrapper.
|
WrappedChunkCoordinate(ChunkPosition position)
Create a chunk coordinate wrapper from a given position.
|
WrappedChunkCoordinate(java.lang.Comparable handle)
Create a wrapper for a specific chunk coordinates.
|
WrappedChunkCoordinate(int x,
int y,
int z)
Create a wrapper with specific values.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(WrappedChunkCoordinate other) |
boolean |
equals(java.lang.Object other) |
java.lang.Object |
getHandle()
Retrieves the underlying NMS object.
|
int |
getX()
Retrieve the x coordinate of the underlying coordinate.
|
int |
getY()
Retrieve the y coordinate of the underlying coordinate.
|
int |
getZ()
Retrieve the z coordinate of the underlying coordinate.
|
int |
hashCode() |
void |
setX(int newX)
Set the x coordinate of the underlying coordinate.
|
void |
setY(int newY)
Set the y coordinate of the underlying coordinate.
|
void |
setZ(int newZ)
Set the z coordinate of the underlying coordiate.
|
ChunkPosition |
toPosition()
Create an immutable chunk position from this coordinate.
|
java.lang.String |
toString() |
getHandleType, setHandle
public WrappedChunkCoordinate()
public WrappedChunkCoordinate(java.lang.Comparable handle)
handle
- - the NMS chunk coordinates.public WrappedChunkCoordinate(int x, int y, int z)
x
- - the x coordinate.y
- - the y coordinate.z
- - the z coordinate.public WrappedChunkCoordinate(ChunkPosition position)
position
- - the given position.public java.lang.Object getHandle()
AbstractWrapper
getHandle
in class AbstractWrapper
public int getX()
public void setX(int newX)
newX
- - the new x coordinate.public int getY()
public void setY(int newY)
newY
- - the new y coordinate.public int getZ()
public void setZ(int newZ)
newZ
- - the new z coordinate.public ChunkPosition toPosition()
public int compareTo(WrappedChunkCoordinate other)
compareTo
in interface java.lang.Comparable<WrappedChunkCoordinate>
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object