mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2024-11-24 14:06:31 +00:00
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
From 726f1c18c4ca993a36f82dd1d3a0af5f871d57ea Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sat, 18 May 2024 11:39:58 +1000
|
|
Subject: [PATCH] Add unload-frozen-chunks option
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
|
index 156d359f2c..5f8c491ebf 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
|
@@ -364,7 +364,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
|
|
gameprofilerfiller.push("purge");
|
|
this.level.timings.doChunkMap.startTiming(); // Spigot
|
|
- if (this.level.tickRateManager().runsNormally() || !flag) {
|
|
+ if (this.level.tickRateManager().runsNormally() || !flag || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
|
|
this.distanceManager.purgeStaleTickets();
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index ebddbf6d0c..2891e2537b 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -393,4 +393,9 @@ public class SpigotWorldConfig
|
|
private void belowZeroGenerationInExistingChunks() {
|
|
belowZeroGenerationInExistingChunks = getBoolean("below-zero-generation-in-existing-chunks", true);
|
|
}
|
|
+
|
|
+ public boolean unloadFrozenChunks;
|
|
+ private void unloadFrozenChunks() {
|
|
+ unloadFrozenChunks = getBoolean("unload-frozen-chunks", false);
|
|
+ }
|
|
}
|
|
--
|
|
2.47.0
|
|
|