From d5bbbc49032e8272564a3d4c646cdb6e824d7226 Mon Sep 17 00:00:00 2001 From: XiaoMoMi Date: Fri, 5 Dec 2025 23:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BD=9C=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../craftengine/core/world/chunk/client/ClientChunk.java | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/net/momirealms/craftengine/core/world/chunk/client/ClientChunk.java b/core/src/main/java/net/momirealms/craftengine/core/world/chunk/client/ClientChunk.java index 03e0ac6ad..b99d3a574 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/world/chunk/client/ClientChunk.java +++ b/core/src/main/java/net/momirealms/craftengine/core/world/chunk/client/ClientChunk.java @@ -22,6 +22,7 @@ public class ClientChunk { public boolean isOccluding(int x, int y, int z) { if (this.sections == null) return false; int index = sectionIndex(SectionPos.blockToSectionCoord(y)); + if (index < 0 || index >= this.sections.length) return false; ClientSection section = this.sections[index]; if (section == null) return false; return section.isOccluding((y & 15) << 8 | (z & 15) << 4 | x & 15); @@ -30,6 +31,7 @@ public class ClientChunk { public void setOccluding(int x, int y, int z, boolean occluding) { if (this.sections == null) return; int index = sectionIndex(SectionPos.blockToSectionCoord(y)); + if (index < 0 || index >= this.sections.length) return; ClientSection section = this.sections[index]; if (section == null) return; section.setOccluding((y & 15) << 8 | (z & 15) << 4 | x & 15, occluding); diff --git a/gradle.properties b/gradle.properties index 496c67425..bf950c905 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx1G # Project settings -project_version=0.0.65.17 +project_version=0.0.65.18 config_version=60 lang_version=43 project_group=net.momirealms