mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
My OCD made me do it.
This commit is contained in:
@ -42,7 +42,7 @@ public class ChunkletUnloader implements Runnable {
|
||||
|
||||
//Chunklets are unloaded only if their chunk has been unloaded for minimumInactiveTime
|
||||
if (inactiveTime >= minimumInactiveTime) {
|
||||
if(mcMMO.placeStore == null)
|
||||
if (mcMMO.placeStore == null)
|
||||
continue;
|
||||
|
||||
mcMMO.placeStore.unloadChunk(chunk.getX(), chunk.getZ(), chunk.getWorld());
|
||||
|
@ -23,7 +23,7 @@ public class GreenThumbTimer implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if(this.block.getType() != this.type)
|
||||
if (this.block.getType() != this.type)
|
||||
this.block.setType(this.type);
|
||||
|
||||
int skillLevel = this.profile.getSkillLevel(SkillType.HERBALISM);
|
||||
|
@ -25,7 +25,7 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if(this.taskID >= 0)
|
||||
if (this.taskID >= 0)
|
||||
return;
|
||||
|
||||
this.taskID = this.scheduler.scheduleSyncDelayedTask(mcMMO.p, this, 1);
|
||||
@ -34,18 +34,18 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if(!this.dataDir.exists()) {
|
||||
if (!this.dataDir.exists()) {
|
||||
softStop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.dataDir.isDirectory()) {
|
||||
if (!this.dataDir.isDirectory()) {
|
||||
this.dataDir.delete();
|
||||
softStop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.dataDir.listFiles().length <= 0) {
|
||||
if (this.dataDir.listFiles().length <= 0) {
|
||||
this.dataDir.delete();
|
||||
softStop();
|
||||
return;
|
||||
@ -54,7 +54,7 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
this.xDirs = this.dataDir.listFiles();
|
||||
|
||||
for (this.i = 0; (this.i < HiddenConfig.getInstance().getConversionRate()) && (this.i < this.xDirs.length); this.i++) {
|
||||
if(this.converters[this.i] == null)
|
||||
if (this.converters[this.i] == null)
|
||||
this.converters[this.i] = new BlockStoreConversionXDirectory();
|
||||
|
||||
this.converters[this.i].start(this.world, this.xDirs[this.i]);
|
||||
@ -64,7 +64,7 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if(this.taskID < 0)
|
||||
if (this.taskID < 0)
|
||||
return;
|
||||
|
||||
this.scheduler.cancelTask(this.taskID);
|
||||
@ -74,7 +74,7 @@ public class BlockStoreConversionMain implements Runnable {
|
||||
public void softStop() {
|
||||
stop();
|
||||
|
||||
if(this.dataDir.exists() || this.dataDir.isDirectory()) {
|
||||
if (this.dataDir.exists() || this.dataDir.isDirectory()) {
|
||||
start();
|
||||
return;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class BlockStoreConversionXDirectory implements Runnable {
|
||||
this.converters = new BlockStoreConversionZDirectory[HiddenConfig.getInstance().getConversionRate()];
|
||||
this.dataDir = dataDir;
|
||||
|
||||
if(this.taskID >= 0)
|
||||
if (this.taskID >= 0)
|
||||
return;
|
||||
|
||||
this.taskID = this.scheduler.scheduleSyncDelayedTask(mcMMO.p, this, 1);
|
||||
@ -35,18 +35,18 @@ public class BlockStoreConversionXDirectory implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if(!this.dataDir.exists()) {
|
||||
if (!this.dataDir.exists()) {
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.dataDir.isDirectory()) {
|
||||
if (!this.dataDir.isDirectory()) {
|
||||
this.dataDir.delete();
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.dataDir.listFiles().length <= 0) {
|
||||
if (this.dataDir.listFiles().length <= 0) {
|
||||
this.dataDir.delete();
|
||||
stop();
|
||||
return;
|
||||
@ -55,7 +55,7 @@ public class BlockStoreConversionXDirectory implements Runnable {
|
||||
this.zDirs = this.dataDir.listFiles();
|
||||
|
||||
for (this.i = 0; (this.i < HiddenConfig.getInstance().getConversionRate()) && (this.i < this.zDirs.length); this.i++) {
|
||||
if(this.converters[this.i] == null)
|
||||
if (this.converters[this.i] == null)
|
||||
this.converters[this.i] = new BlockStoreConversionZDirectory();
|
||||
|
||||
this.converters[this.i].start(this.world, this.dataDir, this.zDirs[this.i]);
|
||||
@ -65,7 +65,7 @@ public class BlockStoreConversionXDirectory implements Runnable {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if(this.taskID < 0)
|
||||
if (this.taskID < 0)
|
||||
return;
|
||||
|
||||
this.scheduler.cancelTask(this.taskID);
|
||||
|
@ -40,7 +40,7 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
this.dataDir = dataDir;
|
||||
this.xDir = xDir;
|
||||
|
||||
if(this.taskID >= 0)
|
||||
if (this.taskID >= 0)
|
||||
return;
|
||||
|
||||
this.taskID = this.scheduler.scheduleSyncDelayedTask(mcMMO.p, this, 1);
|
||||
@ -49,18 +49,18 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if(!this.dataDir.exists()) {
|
||||
if (!this.dataDir.exists()) {
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.dataDir.isDirectory()) {
|
||||
if (!this.dataDir.isDirectory()) {
|
||||
this.dataDir.delete();
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.dataDir.listFiles().length <= 0) {
|
||||
if (this.dataDir.listFiles().length <= 0) {
|
||||
this.dataDir.delete();
|
||||
stop();
|
||||
return;
|
||||
@ -112,7 +112,7 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
|
||||
for(this.y2 = (64 * this.y); this.y2 < (64 * this.y + 64); this.y2++) {
|
||||
try {
|
||||
if(!this.manager.isTrue(this.cxPos, this.y2, this.czPos, this.world))
|
||||
if (!this.manager.isTrue(this.cxPos, this.y2, this.czPos, this.world))
|
||||
continue;
|
||||
|
||||
this.newManager.setTrue(this.cxPos, this.y2, this.czPos, this.world);
|
||||
@ -130,16 +130,16 @@ 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)
|
||||
if (this.primitiveChunklet != null)
|
||||
this.oldArray = this.primitiveChunklet.store[x][z];
|
||||
if(this.primitiveExChunklet != null)
|
||||
if (this.primitiveExChunklet != null)
|
||||
this.oldArray = this.primitiveExChunklet.store[x][z];
|
||||
else
|
||||
return;
|
||||
this.newArray = this.currentChunk.store[x][z];
|
||||
if(this.oldArray.length < 64)
|
||||
if (this.oldArray.length < 64)
|
||||
return;
|
||||
else if(this.newArray.length < ((this.y * 64) + 64))
|
||||
else if (this.newArray.length < ((this.y * 64) + 64))
|
||||
return;
|
||||
System.arraycopy(this.oldArray, 0, this.newArray, (this.y * 64), 64);
|
||||
}
|
||||
@ -150,7 +150,7 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
this.newManager.unloadChunk(this.cx, this.cz, this.world);
|
||||
|
||||
for(File yFile : dataDir.listFiles()) {
|
||||
if(!yFile.exists())
|
||||
if (!yFile.exists())
|
||||
continue;
|
||||
|
||||
yFile.delete();
|
||||
@ -160,7 +160,7 @@ public class BlockStoreConversionZDirectory implements Runnable {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if(this.taskID < 0)
|
||||
if (this.taskID < 0)
|
||||
return;
|
||||
|
||||
this.scheduler.cancelTask(taskID);
|
||||
|
Reference in New Issue
Block a user