From 2abfb0da45774856b48b2fcb818b2f739c4c1634 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Fri, 26 Jan 2024 10:37:02 +1000 Subject: [PATCH] Updated mesher --- .../zenith/client/core/util/Mesher2D.java | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/src/main/java/me/cortex/zenith/client/core/util/Mesher2D.java b/src/main/java/me/cortex/zenith/client/core/util/Mesher2D.java index 8977f476..08461b3b 100644 --- a/src/main/java/me/cortex/zenith/client/core/util/Mesher2D.java +++ b/src/main/java/me/cortex/zenith/client/core/util/Mesher2D.java @@ -81,7 +81,7 @@ public class Mesher2D { while (ex || ez) { //Expand in the x direction if (ex) { - if (endX + 1 > this.maxSize || endX+1 == (1 << this.size) - 1) { + if (endX - x >= this.maxSize || endX >= (1 << this.size) - 1) { ex = false; } } @@ -96,7 +96,7 @@ public class Mesher2D { endX++; } if (ez) { - if (endZ + 1 > this.maxSize || endZ+1 == (1<= this.maxSize || endZ >= (1<