Another try at 1.9 chunk freeze workaround - avoid unloadChunk API

This commit is contained in:
Mike Primm 2016-04-08 00:25:30 -05:00
parent eecef06684
commit 95ba9b9521
3 changed files with 18 additions and 1 deletions

View file

@ -878,7 +878,13 @@ public class NewMapChunkCache extends MapChunkCache {
* by the MC base server is 21x21 (or about a 160 block radius).
* Also, if we did generate it, need to save it */
if (w.isChunkInUse(chunk.x, chunk.z) == false) {
helper.unloadChunkNoSave(w, c, chunk.x, chunk.z);
if (helper.isUnloadChunkBroken()) {
// Give up on broken unloadChunk API - lets see if this works
w.unloadChunkRequest(chunk.x, chunk.z);
}
else {
helper.unloadChunkNoSave(w, c, chunk.x, chunk.z);
}
}
endChunkLoad(startTime, ChunkStats.UNLOADED_CHUNKS);
}