mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +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) {
|
public void chunkUnloaded(int cx, int cz, World world) {
|
||||||
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||||
|
|
||||||
|
for(int y = 1; y <= 4; y++) {
|
||||||
|
if(store.containsKey(world.getName() + "," + cx + "," + cz + "," + y)) {
|
||||||
File cxDir = new File(dataDir, "" + cx);
|
File cxDir = new File(dataDir, "" + cx);
|
||||||
if(!cxDir.exists()) cxDir.mkdir();
|
if(!cxDir.exists()) cxDir.mkdir();
|
||||||
File czDir = new File(cxDir, "" + cz);
|
File czDir = new File(cxDir, "" + cz);
|
||||||
if(!czDir.exists()) czDir.mkdir();
|
if(!czDir.exists()) czDir.mkdir();
|
||||||
|
|
||||||
for(int y = 1; y <= 4; y++) {
|
|
||||||
File yFile = new File(czDir, "" + y);
|
File yFile = new File(czDir, "" + y);
|
||||||
if(store.containsKey(world.getName() + "," + cx + "," + cz + "," + y)) {
|
|
||||||
ChunkletStore out = store.get(world.getName() + "," + cx + "," + cz + "," + y);
|
ChunkletStore out = store.get(world.getName() + "," + cx + "," + cz + "," + y);
|
||||||
serializeChunkletStore(out, yFile);
|
serializeChunkletStore(out, yFile);
|
||||||
store.remove(world.getName() + "," + cx + "," + cz + "," + y);
|
store.remove(world.getName() + "," + cx + "," + cz + "," + y);
|
||||||
|
Loading…
Reference in New Issue
Block a user