From 7d478fc56e0d00a052a5ef90ac5a59ea118aa25f Mon Sep 17 00:00:00 2001 From: makamys Date: Fri, 15 Jul 2022 22:20:15 +0200 Subject: Clean up --- src/main/java/makamys/neodymium/renderer/ChunkMesh.java | 2 -- src/main/java/makamys/neodymium/renderer/NeoChunk.java | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'src') diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java index 93d71b3..6c39d9e 100644 --- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java +++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java @@ -75,8 +75,6 @@ public class ChunkMesh extends Mesh { } private void addTessellatorData(Tessellator t) { - // TODO triangle support - if(t.vertexCount == 0) { // Sometimes the tessellator has no vertices and weird flags. Don't warn in this case, just silently return. return; diff --git a/src/main/java/makamys/neodymium/renderer/NeoChunk.java b/src/main/java/makamys/neodymium/renderer/NeoChunk.java index 3798845..92b5c86 100644 --- a/src/main/java/makamys/neodymium/renderer/NeoChunk.java +++ b/src/main/java/makamys/neodymium/renderer/NeoChunk.java @@ -39,13 +39,8 @@ public class NeoChunk { for(int i = 0; i < 2; i++) { ChunkMesh newChunkMesh = newChunkMeshes.size() > i ? newChunkMeshes.get(i) : null; - if(!addOnly || newChunkMesh != null) { + if(newChunkMesh != null || !addOnly) { if(chunkMeshes[cy * 2 + i] != null) { - if(newChunkMesh != null) { - // ??? why is this needed? - newChunkMesh.pass = i; - } - renderer.removeMesh(chunkMeshes[cy * 2 + i]); chunkMeshes[cy * 2 + i].destroy(); } else { -- cgit