mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Additional changes that are less important but related to the dupe fix.
This commit is contained in:
parent
028f87653a
commit
87ebf7023f
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user