浏览代码

Also handle bottom of world

t00thpick1 7 年之前
父节点
当前提交
f279a979e3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/PrimitiveChunkStore.java

+ 2 - 2
src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/PrimitiveChunkStore.java

@@ -56,7 +56,7 @@ public class PrimitiveChunkStore implements ChunkStore {
 
     @Override
     public void setTrue(int x, int y, int z) {
-        if (z > maxZ)
+        if (z > maxZ || z < 0)
             return;
         store[x][z][y] = true;
         dirty = true;
@@ -64,7 +64,7 @@ public class PrimitiveChunkStore implements ChunkStore {
 
     @Override
     public void setFalse(int x, int y, int z) {
-        if (z > maxZ)
+        if (z > maxZ || z < 0)
             return;
         store[x][z][y] = false;
         dirty = true;