mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Fixing lag caused by conversion.
This commit is contained in:
parent
a17d58fe32
commit
00a5bc5cf3
@ -149,6 +149,10 @@ public class HashChunkManager implements ChunkManager {
|
|||||||
|
|
||||||
ChunkStore in = null;
|
ChunkStore in = null;
|
||||||
|
|
||||||
|
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||||
|
if(dataDir.exists())
|
||||||
|
convertChunk(dataDir, cx, cz, world, true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
in = readChunkStore(world, cx, cz);
|
in = readChunkStore(world, cx, cz);
|
||||||
}
|
}
|
||||||
@ -380,6 +384,12 @@ public class HashChunkManager implements ChunkManager {
|
|||||||
public synchronized void cleanUp() {}
|
public synchronized void cleanUp() {}
|
||||||
|
|
||||||
public synchronized void convertChunk(File dataDir, int cx, int cz, World world) {
|
public synchronized void convertChunk(File dataDir, int cx, int cz, World world) {
|
||||||
|
convertChunk(dataDir, cx, cz, world, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void convertChunk(File dataDir, int cx, int cz, World world, boolean actually) {
|
||||||
|
if(!actually)
|
||||||
|
return;
|
||||||
if(!dataDir.exists()) return;
|
if(!dataDir.exists()) return;
|
||||||
File cxDir = new File(dataDir, "" + cx);
|
File cxDir = new File(dataDir, "" + cx);
|
||||||
if(!cxDir.exists()) return;
|
if(!cxDir.exists()) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user