From 310007e1395cca1a0147c84fd7aa695592285be3 Mon Sep 17 00:00:00 2001 From: makamys Date: Fri, 3 Jun 2022 11:21:57 +0200 Subject: Add optimizeChunkMeshes option --- src/main/java/makamys/lodmod/LODMod.java | 2 ++ src/main/java/makamys/lodmod/mixin/MixinTessellator.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/makamys/lodmod/LODMod.java b/src/main/java/makamys/lodmod/LODMod.java index 97ca822..d2e99ec 100644 --- a/src/main/java/makamys/lodmod/LODMod.java +++ b/src/main/java/makamys/lodmod/LODMod.java @@ -58,6 +58,7 @@ public class LODMod public static boolean hideUnderVanillaChunks; public static boolean disableChunkMeshes; public static boolean disableSimpleMeshes; + public static boolean optimizeChunkMeshes; private File configFile; @@ -98,6 +99,7 @@ public class LODMod hideUnderVanillaChunks = config.getBoolean("hideUnderVanillaChunks", "render", true, ""); disableChunkMeshes = config.getBoolean("disableChunkMeshes", "render", true, ""); disableSimpleMeshes = config.getBoolean("disableSimpleMeshes", "render", false, ""); + optimizeChunkMeshes = config.getBoolean("optimizeChunkMeshes", "render", true, ""); if(config.hasChanged()) { config.save(); diff --git a/src/main/java/makamys/lodmod/mixin/MixinTessellator.java b/src/main/java/makamys/lodmod/mixin/MixinTessellator.java index eea2a31..12eb1ce 100644 --- a/src/main/java/makamys/lodmod/mixin/MixinTessellator.java +++ b/src/main/java/makamys/lodmod/mixin/MixinTessellator.java @@ -83,7 +83,7 @@ abstract class MixinTessellator implements ITessellator { } quads.add(quad); } - boolean optimize = true; + boolean optimize = LODMod.optimizeChunkMeshes; if(optimize) { ArrayList> quadsByPlaneDir = new ArrayList<>(); // XY, XZ, YZ for(int i = 0; i < 3; i++) { -- cgit