aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/renderer/LODRenderer.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2021-05-19 11:39:50 +0200
committermakamys <makamys@outlook.com>2021-05-19 11:39:50 +0200
commit8b13edf3ae85ad5cd2777bdc707502d232bcbc2b (patch)
treea13ea208ac327c0004f4b3e645ea520f04700979 /src/main/java/makamys/lodmod/renderer/LODRenderer.java
parentb22772b8cfc786196579fc7a49b36356f4365ff5 (diff)
downloadNeodymium-8b13edf3ae85ad5cd2777bdc707502d232bcbc2b.tar.gz
Neodymium-8b13edf3ae85ad5cd2777bdc707502d232bcbc2b.tar.bz2
Neodymium-8b13edf3ae85ad5cd2777bdc707502d232bcbc2b.zip
Disable chunk meshes because they're so memory leaky
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/LODRenderer.java')
-rw-r--r--src/main/java/makamys/lodmod/renderer/LODRenderer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
index 22a812e..3c8303d 100644
--- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java
+++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java
@@ -88,6 +88,7 @@ public class LODRenderer {
public int renderRange = 48;
private boolean freezeMeshes;
+ public boolean disableChunkMeshes = true;
public LODRenderer(){
hasInited = init();
@@ -447,6 +448,8 @@ public class LODRenderer {
}
public void onWorldRendererPost(WorldRenderer wr) {
+ if(disableChunkMeshes) return;
+
if(Minecraft.getMinecraft().theWorld.getChunkFromChunkCoords(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16)).isChunkLoaded) {
LODChunk lodChunk = getLODChunk(Math.floorDiv(wr.posX, 16), Math.floorDiv(wr.posZ, 16));
lodChunk.putChunkMeshes(Math.floorDiv(wr.posY, 16), ((IWorldRenderer)wr).getChunkMeshes());