mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Y, not Z, very very important.
This commit is contained in:
parent
c174f2b829
commit
0e51983819
@ -12,7 +12,6 @@ import com.gmail.nossr50.util.blockmeta.ChunkletStore;
|
|||||||
public class PrimitiveChunkStore implements ChunkStore {
|
public class PrimitiveChunkStore implements ChunkStore {
|
||||||
private static final long serialVersionUID = -1L;
|
private static final long serialVersionUID = -1L;
|
||||||
transient private boolean dirty = false;
|
transient private boolean dirty = false;
|
||||||
transient private int maxZ;
|
|
||||||
/** X, Z, Y */
|
/** X, Z, Y */
|
||||||
public boolean[][][] store;
|
public boolean[][][] store;
|
||||||
private static final int CURRENT_VERSION = 7;
|
private static final int CURRENT_VERSION = 7;
|
||||||
@ -25,7 +24,6 @@ public class PrimitiveChunkStore implements ChunkStore {
|
|||||||
this.cx = cx;
|
this.cx = cx;
|
||||||
this.cz = cz;
|
this.cz = cz;
|
||||||
this.worldUid = world.getUID();
|
this.worldUid = world.getUID();
|
||||||
this.maxZ = world.getMaxHeight() - 1;
|
|
||||||
this.store = new boolean[16][16][world.getMaxHeight()];
|
this.store = new boolean[16][16][world.getMaxHeight()];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +54,7 @@ public class PrimitiveChunkStore implements ChunkStore {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setTrue(int x, int y, int z) {
|
public void setTrue(int x, int y, int z) {
|
||||||
if (z > maxZ || z < 0)
|
if (y >= store.length || y < 0)
|
||||||
return;
|
return;
|
||||||
store[x][z][y] = true;
|
store[x][z][y] = true;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
@ -64,7 +62,7 @@ public class PrimitiveChunkStore implements ChunkStore {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFalse(int x, int y, int z) {
|
public void setFalse(int x, int y, int z) {
|
||||||
if (z > maxZ || z < 0)
|
if (y >= store.length || y < 0)
|
||||||
return;
|
return;
|
||||||
store[x][z][y] = false;
|
store[x][z][y] = false;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user