Chunk changes
This commit is contained in:
@@ -4,6 +4,27 @@
|
||||
*/
|
||||
package mc.core.world;
|
||||
|
||||
import mc.core.block.Block;
|
||||
|
||||
/**
|
||||
* Serialization chunk info
|
||||
*
|
||||
* +-------------+----------------+------------+
|
||||
* | param | range | bits |
|
||||
* +-------------+----------------+------------+
|
||||
* | biomeMap | 16x16 0-16 | 4096 |
|
||||
* +-------------+----------------+------------+
|
||||
* | | | 3 |
|
||||
* +-------------+----------------+------------+
|
||||
* | block_count | 0:4096 | 13 |
|
||||
* +-------------+----------------+------------+
|
||||
* | blocks | array | 24*count |
|
||||
* +-------------+----------------+------------+
|
||||
*
|
||||
* Total: 4112 bits header (514 bytes) + 24 * block_count bits (3 * block_count bytes)
|
||||
* Max size: 12802 bytes (~13 Mb per chunk)
|
||||
*
|
||||
*/
|
||||
/* 16x16x16 */
|
||||
public interface Chunk {
|
||||
int getBlockType(int x, int y, int z);
|
||||
@@ -21,6 +42,13 @@ public interface Chunk {
|
||||
int getAddition(int x, int y, int z);
|
||||
void setAddition(int x, int y, int z, int value);
|
||||
|
||||
int getBiome(int x, int z);
|
||||
void setBiome(int x, int z, int value);
|
||||
Biome getBiome(int x, int z);
|
||||
void setBiome(int x, int z, Biome biome);
|
||||
|
||||
int getX();
|
||||
int getY();
|
||||
int getZ();
|
||||
|
||||
Block[] getNotAirBlocks();
|
||||
void setBlock (int x, int y, int z, Block block);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user