Acutally fixed it

This commit is contained in:
Sotr
2018-07-30 00:54:50 +08:00
parent 402d9d2536
commit c42528f4f1

View File

@@ -54,19 +54,16 @@ public abstract class MixinChunkProviderServer {
if (chunk.isUnloading()) { if (chunk.isUnloading()) {
if (chunk.scheduledForUnload != null) { if (chunk.scheduledForUnload != null) {
if (now - chunk.scheduledForUnload > unloadAfter) { if (now - chunk.scheduledForUnload > unloadAfter) {
if (unloadChunk(chunk, true)) {
chunk.scheduledForUnload = null; chunk.scheduledForUnload = null;
it.remove();
}
chunk.setShouldUnload(false);
} else { } else {
continue; continue;
} }
} }
if (!unloadChunk(chunk, true)) { // Event cancelled
// If a plugin cancelled it, we shouldn't trying unload it for a while
chunk.setShouldUnload(false);
} else {
it.remove();
}
if (--remainingChunks <= targetSize || activityAccountant.activityTimeIsExhausted()) break; // more slack since the target size not work as intended if (--remainingChunks <= targetSize || activityAccountant.activityTimeIsExhausted()) break; // more slack since the target size not work as intended
} }
} }