34 lines
649 B
C++
34 lines
649 B
C++
#ifndef MAPBLOCK
|
|
#define MAPBLOCK
|
|
#include "Base.h"
|
|
#include <math.h>
|
|
#include <cstdio>
|
|
|
|
class MapBlock
|
|
{
|
|
public:
|
|
int mapBlock[65536];
|
|
MapBlock();
|
|
// TODO; Make this function work with global coordinates and move it to BlockManager
|
|
void addNode(int id, int meta, int x, int y, int z);
|
|
|
|
};
|
|
|
|
class BlockManager
|
|
{
|
|
public:
|
|
MapBlock mapBlocks[16][16];
|
|
BlockManager();
|
|
int getNodeAt(int x, int y, int z);
|
|
bool isAir(int x, int y, int z);
|
|
};
|
|
|
|
class BlockUtilities
|
|
{
|
|
public:
|
|
BlockUtilities();
|
|
static Position2D getBlockFromNodeCoordinates(int x, int z);
|
|
};
|
|
|
|
#endif
|