From 0e51983819a2d2d595a2ccd583f203dc85def5d1 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Wed, 6 Sep 2017 00:23:35 -0400 Subject: [PATCH] Y, not Z, very very important. --- .../util/blockmeta/chunkmeta/PrimitiveChunkStore.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/PrimitiveChunkStore.java b/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/PrimitiveChunkStore.java index 5ea231c74..94989e14e 100755 --- a/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/PrimitiveChunkStore.java +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/PrimitiveChunkStore.java @@ -12,7 +12,6 @@ import com.gmail.nossr50.util.blockmeta.ChunkletStore; public class PrimitiveChunkStore implements ChunkStore { private static final long serialVersionUID = -1L; transient private boolean dirty = false; - transient private int maxZ; /** X, Z, Y */ public boolean[][][] store; private static final int CURRENT_VERSION = 7; @@ -25,7 +24,6 @@ public class PrimitiveChunkStore implements ChunkStore { this.cx = cx; this.cz = cz; this.worldUid = world.getUID(); - this.maxZ = world.getMaxHeight() - 1; this.store = new boolean[16][16][world.getMaxHeight()]; } @@ -56,7 +54,7 @@ public class PrimitiveChunkStore implements ChunkStore { @Override public void setTrue(int x, int y, int z) { - if (z > maxZ || z < 0) + if (y >= store.length || y < 0) return; store[x][z][y] = true; dirty = true; @@ -64,7 +62,7 @@ public class PrimitiveChunkStore implements ChunkStore { @Override public void setFalse(int x, int y, int z) { - if (z > maxZ || z < 0) + if (y >= store.length || y < 0) return; store[x][z][y] = false; dirty = true;