Additional changes that are less important but related to the dupe fix.

This commit is contained in:
t00thpick1 2017-09-12 20:01:09 -04:00
parent 028f87653a
commit 87ebf7023f

View File

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