readd diverged version
This commit is contained in:
38
include/MapBlock.h
Normal file
38
include/MapBlock.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user