Replace anonymous thread creation with runnable constructor
This commit is contained in:
parent
b073d591fb
commit
4b41c6b1d7
@ -67,22 +67,20 @@ public final class CachedWorld implements IBlockTypeAccess {
|
|||||||
// Insert an invalid region element
|
// Insert an invalid region element
|
||||||
cachedRegions.put(0, null);
|
cachedRegions.put(0, null);
|
||||||
new PackerThread().start();
|
new PackerThread().start();
|
||||||
new Thread() {
|
new Thread(() -> {
|
||||||
public void run() {
|
try {
|
||||||
try {
|
Thread.sleep(30000);
|
||||||
Thread.sleep(30000);
|
while (true) {
|
||||||
while (true) {
|
// since a region only saves if it's been modified since its last save
|
||||||
// since a region only saves if it's been modified since its last save
|
// saving every 10 minutes means that once it's time to exit
|
||||||
// saving every 10 minutes means that once it's time to exit
|
// we'll only have a couple regions to save
|
||||||
// we'll only have a couple regions to save
|
save();
|
||||||
save();
|
Thread.sleep(600000);
|
||||||
Thread.sleep(600000);
|
|
||||||
}
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}.start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void queueForPacking(Chunk chunk) {
|
public final void queueForPacking(Chunk chunk) {
|
||||||
|
Loading…
Reference in New Issue
Block a user