Add unload-frozen-chunks option

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-05-18 11:39:58 +10:00
parent 479ce445d6
commit 9940174241
2 changed files with 7 additions and 1 deletions

View File

@ -106,8 +106,9 @@
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("purge");
- if (this.level.tickRateManager().runsNormally() || !tickChunks) {
+ this.level.timings.doChunkMap.startTiming(); // Spigot
if (this.level.tickRateManager().runsNormally() || !tickChunks) {
+ if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
this.distanceManager.purgeStaleTickets();
}

View File

@ -393,4 +393,9 @@ public class SpigotWorldConfig
private void belowZeroGenerationInExistingChunks() {
this.belowZeroGenerationInExistingChunks = this.getBoolean("below-zero-generation-in-existing-chunks", true);
}
public boolean unloadFrozenChunks;
private void unloadFrozenChunks() {
this.unloadFrozenChunks = this.getBoolean("unload-frozen-chunks", false);
}
}