public class Chunk
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CHUNKFILESUFFIX
The suffix of a chunk files.
|
protected static java.lang.String |
METAFILESUFFIX
The suffix of the metafile
|
Constructor and Description |
---|
Chunk()
Creates a Chunk filled with empty cells (likely air).
|
Chunk(int coordX,
int coordY,
Generator generator)
Creates a chunk.
|
Chunk(int pos,
int coordX,
int coordY,
java.lang.String mapname,
Generator generator)
Creates a chunk.
|
Modifier and Type | Method and Description |
---|---|
static int |
getBlocksX()
The amount of blocks in X direction
|
static int |
getBlocksY()
The amount of blocks in Y direction
|
static int |
getBlocksZ()
The amount of blocks in Z direction
|
Cell[][][] |
getData()
Returns the data of the chunk
|
static int |
getGameDepth() |
static int |
getGameHeight()
The height of the map.
|
static int |
getGameWidth() |
static int |
getScreenDepth() |
static int |
getScreenWidth() |
static void |
readMapInfo(java.lang.String mapName)
reads the map info file and sets the size of the chunk
|
void |
setData(Cell[][][] data) |
protected static final java.lang.String CHUNKFILESUFFIX
protected static final java.lang.String METAFILESUFFIX
public Chunk()
public Chunk(int pos, int coordX, int coordY, java.lang.String mapname, Generator generator)
pos
- the position of the chunk. Value between 0-8coordX
- the chunk coordinatecoordY
- the chunk coordinatemapname
- generator
- public Chunk(int coordX, int coordY, Generator generator)
coordX
- the chunk coordinatecoordY
- the chunk coordinategenerator
- public static void readMapInfo(java.lang.String mapName)
mapName
- public static int getBlocksX()
public static int getBlocksY()
public static int getBlocksZ()
public Cell[][][] getData()
public void setData(Cell[][][] data)
data
- public static int getScreenWidth()
public static int getScreenDepth()
public static int getGameWidth()
public static int getGameDepth()
public static int getGameHeight()