aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0023-Allow-for-toggling-of-spawn-chunks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0023-Allow-for-toggling-of-spawn-chunks.patch')
-rw-r--r--Spigot-Server-Patches/0023-Allow-for-toggling-of-spawn-chunks.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0023-Allow-for-toggling-of-spawn-chunks.patch b/Spigot-Server-Patches/0023-Allow-for-toggling-of-spawn-chunks.patch
new file mode 100644
index 0000000000..043308e6c3
--- /dev/null
+++ b/Spigot-Server-Patches/0023-Allow-for-toggling-of-spawn-chunks.patch
@@ -0,0 +1,38 @@
+From 289ae9cebc581e749f5db697a19ef7c36c524bee Mon Sep 17 00:00:00 2001
+From: Dmck2b <[email protected]>
+Date: Thu, 10 Jul 2014 16:57:10 +0100
+Subject: [PATCH] Allow for toggling of spawn chunks
+
+Now with 100% more confirmed working by creator
+
+diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
+index 9741e94..9770cf0 100644
+--- a/src/main/java/net/minecraft/server/World.java
++++ b/src/main/java/net/minecraft/server/World.java
+@@ -223,6 +223,7 @@ public abstract class World implements IBlockAccess {
+ this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
+ this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit
+ // CraftBukkit end
++ this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot
+ // Spigot start
+ this.chunkTickRadius = (byte) ( ( this.getServer().getViewDistance() < 7 ) ? this.getServer().getViewDistance() : 7 );
+ this.chunkTickList = new net.minecraft.util.gnu.trove.map.hash.TLongShortHashMap( spigotConfig.chunksPerTick * 5, 0.7f, Long.MIN_VALUE, Short.MIN_VALUE );
+diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+index e627c4e..39bbd62 100644
+--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+@@ -162,4 +162,11 @@ public class PaperSpigotWorldConfig
+ softDespawnDistance = softDespawnDistance*softDespawnDistance;
+ hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
+ }
++
++ public boolean keepSpawnInMemory;
++ private void keepSpawnInMemory()
++ {
++ keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
++ log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
++ }
+ }
+--
+1.9.1
+