public final class Coordinates
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.awt.Point[] |
blockToChunk(int blockX,
int blockZ)
Translate absolute block coordinates to a set of chunk coordinates, and
local coordinates within the chunk.
|
static java.awt.Point |
chunkInTileToAbsolute(Tile tile,
int chunkX,
int chunkY)
Translate a chunk coordinate within a tile to absolute world coordinates.
|
static java.awt.Point |
tileLocalToAbsolute(Tile tile,
int blockX,
int blockY)
Translate a block coordinate within a tile to absolute world coordinates.
|
public static java.awt.Point tileLocalToAbsolute(Tile tile, int blockX, int blockY)
tile
- The tile in which to translate coordinates.blockX
- The X coordinate of the block within the tile.blockY
- The Y coordinate of the block within the tile.public static java.awt.Point chunkInTileToAbsolute(Tile tile, int chunkX, int chunkY)
tile
- The tile in which to translate coordinates.chunkX
- The X coordinate of the chunk within the tile.chunkY
- The Y coordinate of the chunk within the tile.public static java.awt.Point[] blockToChunk(int blockX, int blockZ)
blockX
- The absolute X coordinate of the block.blockZ
- The absolute Z coordinate of the block.