Minor changes

This commit is contained in:
2022-10-30 11:53:41 -04:00
parent 1965b97c19
commit 922826da0b
6 changed files with 45 additions and 47 deletions

View File

@@ -7,22 +7,18 @@
class NodeManager
class MapBlock
{
public:
int blockX;
int blockZ;
NodeManager()
MapBlock()
{
}
virtual ~NodeManager()
{
}
void addNode(int id, int meta, int x, int y, int z)
{
@@ -36,7 +32,7 @@ class NodeManager
int getNodeAt(int x, int y, int z)
{
return x < 16 && z < 16 && x >= 0 && z >= 0 ? mapBlock[256 * y + z * 16 + x] : 0;
return x < 16 && z < 16 && x >= 0 && z >= 0 ? mapBlock[256 * y + z * 16 + x] : 1;
}
protected:
@@ -48,7 +44,7 @@ class NodeManager
class BlockManager
{
public:
NodeManager mapBlocks[8][8]; // 8 x 8 blocks
MapBlock mapBlocks[16][16]; // 8 x 8 blocks
BlockManager()
{