|
@@ -5,6 +5,7 @@ import java.io.ObjectInputStream;
|
|
import java.io.ObjectOutputStream;
|
|
import java.io.ObjectOutputStream;
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
+import org.bukkit.Bukkit;
|
|
import org.bukkit.World;
|
|
import org.bukkit.World;
|
|
|
|
|
|
import com.gmail.nossr50.util.blockmeta.ChunkletStore;
|
|
import com.gmail.nossr50.util.blockmeta.ChunkletStore;
|
|
@@ -72,7 +73,7 @@ public class PrimitiveChunkStore implements ChunkStore {
|
|
public boolean isEmpty() {
|
|
public boolean isEmpty() {
|
|
for (int x = 0; x < 16; x++) {
|
|
for (int x = 0; x < 16; x++) {
|
|
for (int z = 0; z < 16; z++) {
|
|
for (int z = 0; z < 16; z++) {
|
|
- for (int y = 0; y < store.length; y++) {
|
|
|
|
|
|
+ for (int y = 0; y < store[0][0].length; y++) {
|
|
if (store[x][z][y]) {
|
|
if (store[x][z][y]) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -86,7 +87,7 @@ public class PrimitiveChunkStore implements ChunkStore {
|
|
public void copyFrom(ChunkletStore otherStore) {
|
|
public void copyFrom(ChunkletStore otherStore) {
|
|
for (int x = 0; x < 16; x++) {
|
|
for (int x = 0; x < 16; x++) {
|
|
for (int z = 0; z < 16; z++) {
|
|
for (int z = 0; z < 16; z++) {
|
|
- for (int y = 0; y < store.length; y++) {
|
|
|
|
|
|
+ for (int y = 0; y < store[0][0].length; y++) {
|
|
store[x][z][y] = otherStore.isTrue(x, y, z);
|
|
store[x][z][y] = otherStore.isTrue(x, y, z);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -132,10 +133,10 @@ public class PrimitiveChunkStore implements ChunkStore {
|
|
|
|
|
|
private void fixArray() {
|
|
private void fixArray() {
|
|
boolean[][][] temp = this.store;
|
|
boolean[][][] temp = this.store;
|
|
- this.store = new boolean[16][16][temp.length];
|
|
|
|
|
|
+ this.store = new boolean[16][16][Bukkit.getWorld(worldUid).getMaxHeight()];
|
|
for (int x = 0; x < 16; x++) {
|
|
for (int x = 0; x < 16; x++) {
|
|
for (int z = 0; z < 16; z++) {
|
|
for (int z = 0; z < 16; z++) {
|
|
- for (int y = 0; y < temp.length; y++) {
|
|
|
|
|
|
+ for (int y = 0; y < store[0][0].length; y++) {
|
|
try {
|
|
try {
|
|
store[x][z][y] = temp[x][y][z];
|
|
store[x][z][y] = temp[x][y][z];
|
|
}
|
|
}
|