mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Move to a more ideal location.
Not as efficient as I would like, but certainly better than it was before
This commit is contained in:
parent
d0bb7b075e
commit
6da43b15c8
@ -37,14 +37,15 @@ public class HashChunkletManager implements ChunkletManager {
|
||||
|
||||
public void chunkUnloaded(int cx, int cz, World world) {
|
||||
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||
File cxDir = new File(dataDir, "" + cx);
|
||||
if(!cxDir.exists()) cxDir.mkdir();
|
||||
File czDir = new File(cxDir, "" + cz);
|
||||
if(!czDir.exists()) czDir.mkdir();
|
||||
|
||||
for(int y = 1; y <= 4; y++) {
|
||||
File yFile = new File(czDir, "" + y);
|
||||
if(store.containsKey(world.getName() + "," + cx + "," + cz + "," + y)) {
|
||||
File cxDir = new File(dataDir, "" + cx);
|
||||
if(!cxDir.exists()) cxDir.mkdir();
|
||||
File czDir = new File(cxDir, "" + cz);
|
||||
if(!czDir.exists()) czDir.mkdir();
|
||||
File yFile = new File(czDir, "" + y);
|
||||
|
||||
ChunkletStore out = store.get(world.getName() + "," + cx + "," + cz + "," + y);
|
||||
serializeChunkletStore(out, yFile);
|
||||
store.remove(world.getName() + "," + cx + "," + cz + "," + y);
|
||||
|
Loading…
Reference in New Issue
Block a user