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:
@@ -25,7 +25,7 @@ class NodeRenderer
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
// Front
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16 - 1) == 0)
|
||||
if(blockManager.isAir(x, y, z + 1))
|
||||
{
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + .0F, y + 1.0F, z + .0F);
|
||||
@@ -43,7 +43,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Back
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y, z - block.z * 16 + 1) == 0)
|
||||
if(blockManager.isAir(x, y, z - 1))
|
||||
{
|
||||
|
||||
glTexCoord2f(.0F, .0F);
|
||||
@@ -62,7 +62,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Right
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16 + 1, y, z - block.z * 16) == 0);
|
||||
if(blockManager.isAir(x + 1, y, z))
|
||||
{
|
||||
glTexCoord2f(1.0F, .0F);
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + .0F);
|
||||
@@ -80,7 +80,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Left
|
||||
if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16 - 1, y, z - block.z * 16) == 0);
|
||||
if(blockManager.isAir(x - 1, y, z))
|
||||
{
|
||||
glTexCoord2f(1.0F, .0F);
|
||||
glVertex3f(x + .0F, y + 1.0F, z + .0F);
|
||||
@@ -98,8 +98,10 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Bottom
|
||||
if(blockManager.getNodeAt(x, y - 1, z) == 0);
|
||||
//printf("\n\nx: %i, y: %i, z: %i, VALUE: %s", x, y, z, blockManager.isAir(x, y - 1, z) ? "true" : "false");
|
||||
if(blockManager.isAir(x, y - 1, z))
|
||||
{
|
||||
//printf("\nWUT? x: %i, y: %i, z: %i, VALUE: %s", x, y, z, blockManager.isAir(x, y - 1, z) ? "true" : "false");
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + 1.0F, y + .0F, z + .0F);
|
||||
|
||||
@@ -114,7 +116,7 @@ class NodeRenderer
|
||||
}
|
||||
|
||||
// Top
|
||||
/*if(blockManager.mapBlocks[block.x][block.z].getNodeAt(x - block.x * 16, y + 1, z - block.z * 16) == 0);
|
||||
if(blockManager.isAir(x, y + 1, z))
|
||||
{
|
||||
glTexCoord2f(.0F, .0F);
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + .0F);
|
||||
@@ -127,7 +129,7 @@ class NodeRenderer
|
||||
|
||||
glTexCoord2f(.0F, 1.0F);
|
||||
glVertex3f(x + 1.0F, y + 1.0F, z + 1.0F);
|
||||
}*/
|
||||
}
|
||||
|
||||
glEnd();
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user