diff options
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/ChunkMesh.java')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/ChunkMesh.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java index 958b941..3b1f1ef 100644 --- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java +++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java @@ -108,8 +108,8 @@ public class ChunkMesh extends Mesh { quadsByPlaneDir.add(new ArrayList<MeshQuad>()); } for(MeshQuad quad : quads) { - if(quad.plane != MeshQuad.PLANE_NONE) { - quadsByPlaneDir.get(quad.plane).add(quad); + if(quad.plane != MeshQuad.Plane.NONE) { + quadsByPlaneDir.get(quad.plane.ordinal() - 1).add(quad); } } for(int plane = 0; plane < 3; plane++) { @@ -238,7 +238,9 @@ public class ChunkMesh extends Mesh { try { for(MeshQuad quad : quads) { - quad.writeToBuffer(out); + if(quad.isValid(quad)) { + quad.writeToBuffer(out); + } } } catch(IOException e) { e.printStackTrace(); |