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