XtreemNodes/include/MapBlock.h

34 lines
649 B
C
Raw Normal View History

#ifndef MAPBLOCK
#define MAPBLOCK
2022-10-22 17:03:43 +02:00
#include "Base.h"
2022-10-23 23:44:58 +02:00
#include <math.h>
#include <cstdio>
2022-10-23 23:44:58 +02:00
2022-10-30 16:53:41 +01:00
class MapBlock
2022-10-22 17:03:43 +02:00
{
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);
2022-10-22 17:03:43 +02:00
};
class BlockUtilities
2022-10-23 23:44:58 +02:00
{
2022-10-26 23:13:48 +02:00
public:
BlockUtilities();
static Position2D getBlockFromNodeCoordinates(int x, int z);
};
2022-10-23 23:44:58 +02:00
2022-10-22 17:03:43 +02:00
#endif