mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-05 18:20:18 +01:00
Switch MCPC+ to using unloadChunkRequest - unloadChunk() seems to not clean up properly
This commit is contained in:
parent
bf16d18371
commit
bee16ef331
@ -106,4 +106,8 @@ public abstract class BukkitVersionHelper {
|
||||
* Get field value from NBT compound
|
||||
*/
|
||||
public abstract Object getFieldValue(Object nbt, String field);
|
||||
/**
|
||||
* Unload chunk no save needed
|
||||
*/
|
||||
public abstract void unloadChunkNoSave(World w, int cx, int cz);
|
||||
}
|
||||
|
@ -95,5 +95,8 @@ public class BukkitVersionHelperBukkitForge extends BukkitVersionHelperGeneric {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unloadChunkNoSave(World w, int cx, int cz) {
|
||||
w.unloadChunkRequest(cx, cz);
|
||||
}
|
||||
}
|
||||
|
@ -93,4 +93,9 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric {
|
||||
nmst_y = getField(nms_tileentity, new String[] { "y" }, int.class);
|
||||
nmst_z = getField(nms_tileentity, new String[] { "z" }, int.class);
|
||||
}
|
||||
@Override
|
||||
public void unloadChunkNoSave(World w, int cx, int cz) {
|
||||
w.unloadChunk(cx, cz, false, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -88,4 +88,8 @@ public class BukkitVersionHelperMCPC extends BukkitVersionHelperGeneric {
|
||||
nmst_y = getField(nms_tileentity, new String[] { "m" }, int.class);
|
||||
nmst_z = getField(nms_tileentity, new String[] { "n" }, int.class);
|
||||
}
|
||||
@Override
|
||||
public void unloadChunkNoSave(World w, int cx, int cz) {
|
||||
w.unloadChunkRequest(cx, cz);
|
||||
}
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ public class NewMapChunkCache implements MapChunkCache {
|
||||
* while the actual in-use chunk area for a player where the chunks are managed
|
||||
* by the MC base server is 21x21 (or about a 160 block radius).
|
||||
* Also, if we did generate it, need to save it */
|
||||
w.unloadChunk(chunk.x, chunk.z, false, false);
|
||||
helper.unloadChunkNoSave(w, chunk.x, chunk.z);
|
||||
}
|
||||
else if (isunloadpending) { /* Else, if loaded and unload is pending */
|
||||
w.unloadChunkRequest(chunk.x, chunk.z); /* Request new unload */
|
||||
|
Loading…
Reference in New Issue
Block a user