mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 20:45:28 +02:00
minor cleanup
This commit is contained in:
@@ -7,7 +7,7 @@ import org.bukkit.scheduler.BukkitScheduler;
|
||||
import java.io.File;
|
||||
|
||||
public class BlockStoreConversionMain implements Runnable {
|
||||
private int taskID, i;
|
||||
private int taskID;
|
||||
private org.bukkit.World world;
|
||||
BukkitScheduler scheduler;
|
||||
File dataDir;
|
||||
@@ -52,12 +52,12 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
|
||||
this.xDirs = this.dataDir.listFiles();
|
||||
|
||||
for (this.i = 0; (this.i < ChunkConversionOptions.getConversionRate()) && (this.i < this.xDirs.length); this.i++) {
|
||||
if (this.converters[this.i] == null) {
|
||||
this.converters[this.i] = new BlockStoreConversionXDirectory();
|
||||
for (int i = 0; (i < ChunkConversionOptions.getConversionRate()) && (i < this.xDirs.length); i++) {
|
||||
if (this.converters[i] == null) {
|
||||
this.converters[i] = new BlockStoreConversionXDirectory();
|
||||
}
|
||||
|
||||
this.converters[this.i].start(this.world, this.xDirs[this.i]);
|
||||
this.converters[i].start(this.world, this.xDirs[i]);
|
||||
}
|
||||
|
||||
softStop();
|
||||
|
@@ -7,7 +7,7 @@ import org.bukkit.scheduler.BukkitScheduler;
|
||||
import java.io.File;
|
||||
|
||||
public class BlockStoreConversionXDirectory implements Runnable {
|
||||
private int taskID, i;
|
||||
private int taskID;
|
||||
private org.bukkit.World world;
|
||||
BukkitScheduler scheduler;
|
||||
File dataDir;
|
||||
@@ -53,12 +53,12 @@ public class BlockStoreConversionXDirectory implements Runnable {
|
||||
|
||||
this.zDirs = this.dataDir.listFiles();
|
||||
|
||||
for (this.i = 0; (this.i < ChunkConversionOptions.getConversionRate()) && (this.i < this.zDirs.length); this.i++) {
|
||||
if (this.converters[this.i] == null) {
|
||||
this.converters[this.i] = new BlockStoreConversionZDirectory();
|
||||
for (int i = 0; (i < ChunkConversionOptions.getConversionRate()) && (i < this.zDirs.length); i++) {
|
||||
if (this.converters[i] == null) {
|
||||
this.converters[i] = new BlockStoreConversionZDirectory();
|
||||
}
|
||||
|
||||
this.converters[this.i].start(this.world, this.dataDir, this.zDirs[this.i]);
|
||||
this.converters[i].start(this.world, this.dataDir, this.zDirs[i]);
|
||||
}
|
||||
|
||||
stop();
|
||||
|
@@ -23,7 +23,6 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
private PrimitiveChunkletStore primitiveChunklet = null;
|
||||
private PrimitiveExChunkletStore primitiveExChunklet = null;
|
||||
private PrimitiveChunkStore currentChunk;
|
||||
private boolean[] oldArray, newArray;
|
||||
|
||||
public BlockStoreConversionZDirectory() {
|
||||
this.taskID = -1;
|
||||
@@ -130,27 +129,25 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
|
||||
for (this.x = 0; this.x < 16; this.x++) {
|
||||
for (this.z = 0; this.z < 16; this.z++) {
|
||||
if (this.primitiveChunklet != null) {
|
||||
this.oldArray = this.primitiveChunklet.store[x][z];
|
||||
}
|
||||
boolean[] oldArray;
|
||||
|
||||
if (this.primitiveExChunklet != null) {
|
||||
this.oldArray = this.primitiveExChunklet.store[x][z];
|
||||
oldArray = this.primitiveExChunklet.store[x][z];
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
|
||||
this.newArray = this.currentChunk.store[x][z];
|
||||
boolean[] newArray = this.currentChunk.store[x][z];
|
||||
|
||||
if (this.oldArray.length < 64) {
|
||||
if (oldArray.length < 64) {
|
||||
return;
|
||||
}
|
||||
else if (this.newArray.length < ((this.y * 64) + 64)) {
|
||||
else if (newArray.length < ((this.y * 64) + 64)) {
|
||||
return;
|
||||
}
|
||||
|
||||
System.arraycopy(this.oldArray, 0, this.newArray, (this.y * 64), 64);
|
||||
System.arraycopy(oldArray, 0, newArray, (this.y * 64), 64);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user