Class Coordinate

java.lang.Object
be.seeseemelk.mockbukkit.Coordinate

public class Coordinate extends Object
A simple class that contains an x, y and z coordinate as integers.
  • Field Details

    • x

      public final int x
    • y

      public final int y
    • z

      public final int z
  • 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

      @NotNull public @NotNull ChunkCoordinate toChunkCoordinate()
      Gets the chunk coordinate this coordinate is in.
      Returns:
      The chunk coordinate of this coordinate.
    • toLocalCoordinate

      @NotNull public @NotNull Coordinate toLocalCoordinate()
      Gets the coordinate relative to the chunk.
      Returns:
      The local coordinate.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object