Class ChunkPosition

java.lang.Object
com.viaversion.viaversion.api.minecraft.ChunkPosition

public final class ChunkPosition extends Object
  • Constructor Details

    • ChunkPosition

      public ChunkPosition(int chunkX, int chunkZ)
    • ChunkPosition

      public ChunkPosition(long chunkKey)
  • Method Details

    • chunkX

      public int chunkX()
    • chunkZ

      public int chunkZ()
    • chunkKey

      public long chunkKey()
      Returns a long key for this chunk position.
      Returns:
      the chunk key
    • chunkKey

      public static long chunkKey(int chunkX, int chunkZ)
      Returns a long key for the given chunk coordinates.
      Parameters:
      chunkX - the chunk X coordinate
      chunkZ - the chunk Z coordinate
      Returns:
      the chunk key
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object