diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/ChunkMesh.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java index c89129c..dc434b3 100644 --- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java +++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java @@ -257,9 +257,13 @@ public class ChunkMesh extends Mesh { BufferWriter out = new BufferWriter(buffer); try { + int i = 0; for(MeshQuad quad : quads) { - if(MeshQuad.isValid(quad)) { - quad.writeToBuffer(out); + if(i < quadCount) { + if(MeshQuad.isValid(quad)) { + quad.writeToBuffer(out); + i++; + } } } } catch(IOException e) { |