XtreemNodes/include/MapBlock.h
2023-09-23 21:19:52 +00:00

39 lines
686 B
C++

#ifndef MAPBLOCK
#define MAPBLOCK
#include "Base.h"
#include <math.h>
#include <cstdio>
class MapBlock
{
public:
int mapBlock[65536];
MapBlock();
};
class BlockManager
{
public:
MapBlock mapBlocks[16][16];
BlockManager();
int getNodeAt(int x, int y, int z);
void addNode(int id, int meta, int x, int y, int z);
bool isAir(int x, int y, int z);
bool isNodeClear(int x, int y, int z);
};
struct Position2D
{
int x;
int z;
};
class BlockUtilities
{
public:
BlockUtilities();
static Position2D getBlockFromNodeCoordinates(int x, int z);
};
#endif