mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Attempting to fix index error.
This commit is contained in:
parent
83e072dad1
commit
62f5185a1b
@ -71,7 +71,7 @@ public class WorldListener implements Listener {
|
|||||||
|
|
||||||
manager.loadChunk(cx, cz, world);
|
manager.loadChunk(cx, cz, world);
|
||||||
|
|
||||||
for(int y = 0; y < 4; y++) {
|
for(int y = 0; y < (world.getMaxHeight() / 64); y++) {
|
||||||
String chunkletName = world.getName() + "," + cx + "," + cz + "," + y;
|
String chunkletName = world.getName() + "," + cx + "," + cz + "," + y;
|
||||||
ChunkletStore tempChunklet = manager.store.get(chunkletName);
|
ChunkletStore tempChunklet = manager.store.get(chunkletName);
|
||||||
PrimitiveChunkletStore primitiveChunklet = null;
|
PrimitiveChunkletStore primitiveChunklet = null;
|
||||||
@ -120,6 +120,10 @@ public class WorldListener implements Listener {
|
|||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
boolean[] newArray = cChunk.store[x][z];
|
boolean[] newArray = cChunk.store[x][z];
|
||||||
|
if(oldArray.length < 64)
|
||||||
|
return;
|
||||||
|
else if(newArray.length < ((y * 64) + 64))
|
||||||
|
return;
|
||||||
System.arraycopy(oldArray, 0, newArray, (y * 64), 64);
|
System.arraycopy(oldArray, 0, newArray, (y * 64), 64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
|||||||
|
|
||||||
this.manager.loadChunk(this.cx, this.cz, this.world);
|
this.manager.loadChunk(this.cx, this.cz, this.world);
|
||||||
|
|
||||||
for(this.y = 0; this.y < 4; this.y++) {
|
for(this.y = 0; this.y < (this.world.getMaxHeight() / 64); this.y++) {
|
||||||
this.chunkletName = this.world.getName() + "," + this.cx + "," + this.cz + "," + this.y;
|
this.chunkletName = this.world.getName() + "," + this.cx + "," + this.cz + "," + this.y;
|
||||||
this.tempChunklet = this.manager.store.get(this.chunkletName);
|
this.tempChunklet = this.manager.store.get(this.chunkletName);
|
||||||
if(this.tempChunklet instanceof PrimitiveChunkletStore)
|
if(this.tempChunklet instanceof PrimitiveChunkletStore)
|
||||||
@ -128,6 +128,10 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
|||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
this.newArray = this.currentChunk.store[x][z];
|
this.newArray = this.currentChunk.store[x][z];
|
||||||
|
if(this.oldArray.length < 64)
|
||||||
|
return;
|
||||||
|
else if(this.newArray.length < ((this.y * 64) + 64))
|
||||||
|
return;
|
||||||
System.arraycopy(this.oldArray, 0, this.newArray, (this.y * 64), 64);
|
System.arraycopy(this.oldArray, 0, this.newArray, (this.y * 64), 64);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user