From c47f54dc88c3759421829a13c3cc7c6bbdf3056d Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Thu, 23 May 2019 20:12:57 -0700 Subject: [PATCH] Add configurable spawn loaded range back (#2051) --- ...le-Keep-Spawn-Loaded-range-per-world.patch | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 Spigot-Server-Patches/0396-Configurable-Keep-Spawn-Loaded-range-per-world.patch diff --git a/Spigot-Server-Patches/0396-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0396-Configurable-Keep-Spawn-Loaded-range-per-world.patch new file mode 100644 index 000000000..915cbd15a --- /dev/null +++ b/Spigot-Server-Patches/0396-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -0,0 +1,182 @@ +From 0215320520982945e6cdabfc8f1d484b354122b9 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Sat, 13 Sep 2014 23:14:43 -0400 +Subject: [PATCH] Configurable Keep Spawn Loaded range per world + +This lets you disable it for some worlds and lower it for others. + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 385b3ac0ce..b854061983 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -488,4 +488,10 @@ public class PaperWorldConfig { + break; + } + } ++ ++ public short keepLoadedRange; ++ private void keepLoadedRange() { ++ keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); ++ log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); ++ } + } +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 73ac45bf7a..b7fd59cb89 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -570,6 +570,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant