Turns out it was the semicolons at the end of the lines the if statements were in. This took make me way longer to realize than it should've. :/
This commit is contained in:
@@ -63,18 +63,18 @@ class BlockManager
|
||||
{
|
||||
//if(x < 16 && x >= 0 && z < 16 && z >= 0)
|
||||
//{
|
||||
if(x < 0 || z < 0)
|
||||
if(x < 0 || y < 0 || z < 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Position2D block = BlockUtilities::getBlockFromNodeCoordinates(x, z);
|
||||
//printf("\n\nold x: %i, old z: %i", x, z);
|
||||
//int localX = x - block.x * 16;
|
||||
//int localZ = z - block.z * 16;
|
||||
int localX = x - block.x * 16;
|
||||
int localZ = z - block.z * 16;
|
||||
//printf("\nnew x: %i, new z: %i", x, z);
|
||||
//return mapBlocks[block.x][block.z].mapBlock[256 * y + localZ * 16 + localX];
|
||||
return mapBlocks[block.x][block.z].getNodeAt(x, y, z);
|
||||
return mapBlocks[block.x][block.z].mapBlock[256 * y + localZ * 16 + localX];
|
||||
//return mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16);
|
||||
}
|
||||
|
||||
bool isAir(int x, int y, int z)
|
||||
|
||||
Reference in New Issue
Block a user