Class ChunkPosition
java.lang.Object
com.viaversion.viaversion.api.minecraft.ChunkPosition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongchunkKey()Returns a long key for this chunk position.static longchunkKey(int chunkX, int chunkZ) Returns a long key for the given chunk coordinates.static longchunkKeyForBlock(int x, int z) Returns a long key for the given block coordinates.intchunkX()intchunkZ()booleaninthashCode()toString()
-
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 coordinatechunkZ- the chunk Z coordinate- Returns:
- the chunk key
-
chunkKeyForBlock
public static long chunkKeyForBlock(int x, int z) Returns a long key for the given block coordinates.- Parameters:
x- the block X coordinatez- the block Z coordinate- Returns:
- the chunk key
-
equals
-
hashCode
public int hashCode() -
toString
-