Package be.seeseemelk.mockbukkit
Class Coordinate
java.lang.Object
be.seeseemelk.mockbukkit.Coordinate
A simple class that contains an x, y and z coordinate as integers.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a coordinate object with a (x, y, z) of (0, 0, 0).Coordinate
(int x, int y, int z) Creates a new coordinate object with a specified (x, y, z). -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
@NotNull ChunkCoordinate
Gets the chunk coordinate this coordinate is in.@NotNull Coordinate
Gets the coordinate relative to the chunk.toString()
-
Field Details
-
x
public final int xThe X coordinate. -
y
public final int yThe Y coordinate. -
z
public final int zThe Z coordinate.
-
-
Constructor Details
-
Coordinate
public Coordinate(int x, int y, int z) Creates a new coordinate object with a specified (x, y, z).- Parameters:
x
- The X coordinate to set.y
- The Y coordinate to set.z
- The Z coordinate to set.
-
Coordinate
public Coordinate()Creates a coordinate object with a (x, y, z) of (0, 0, 0).
-
-
Method Details
-
toChunkCoordinate
Gets the chunk coordinate this coordinate is in.- Returns:
- The chunk coordinate of this coordinate.
-
toLocalCoordinate
Gets the coordinate relative to the chunk.- Returns:
- The local coordinate.
-
hashCode
public int hashCode() -
equals
-
toString
-