public final class ChunkData
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
CHUNK_WIDTH
Width of the chunk, not very relevant currently.
|
protected boolean |
colored |
protected byte[] |
data |
protected byte[] |
eight |
protected byte[] |
four |
protected byte |
mainColor |
protected byte[] |
two |
Constructor and Description |
---|
ChunkData(byte[] data)
Construct a ChunkData with the color data provided.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Get the data for this chunk.
|
byte |
getDataAt(int x,
int z)
Get the data at the coordinates specified.
|
byte |
getDataAt(int x,
int z,
double scale)
Get the data at the coordinates specified using the mipmaps.
|
void |
refreshColors()
Refresh the mipmap for this chunk data.
|
public static final int CHUNK_WIDTH
protected final byte[] data
protected boolean colored
protected transient byte[] two
protected transient byte[] four
protected transient byte[] eight
protected transient byte mainColor
public ChunkData(byte[] data)
data
- Cannot be null. Must have length of CHUNK_WIDTH * CHUNK_WIDTHpublic byte[] getData()
public byte getDataAt(int x, int z)
x
- X coordinate from 0 to 15.z
- Z coordinate from 0 to 15.public byte getDataAt(int x, int z, double scale)
x
- X coordinate from 0 to 15.z
- Z coordinate from 0 to 15.scale
- Scale in blocks per pixelpublic void refreshColors()