Paper/Spigot-Server-Patches/0013-Allow-for-toggling-of-spawn-chunks.patch

37 Zeilen
1.7 KiB
Diff

2017-05-14 20:05:01 +02:00
From 63f3013587dc1e8a42ed59e62d6b6bb5225a91dc Mon Sep 17 00:00:00 2001
2016-03-03 10:46:26 +01:00
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 03:53:43 -0600
2016-03-01 00:09:49 +01:00
Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 4b64ccaa0..7ac6a5f1f 100644
2016-03-01 00:09:49 +01:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -115,4 +115,10 @@ public class PaperWorldConfig {
2016-03-01 00:09:49 +01:00
softDespawnDistance = softDespawnDistance*softDespawnDistance;
hardDespawnDistance = hardDespawnDistance*hardDespawnDistance;
}
+
+ public boolean keepSpawnInMemory;
+ private void keepSpawnInMemory() {
+ keepSpawnInMemory = getBoolean("keep-spawn-loaded", true);
+ log("Keep spawn chunk loaded: " + keepSpawnInMemory);
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
2017-05-14 20:05:01 +02:00
index eafb76003..1ff2263eb 100644
2016-03-01 00:09:49 +01:00
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
2017-05-14 20:05:01 +02:00
@@ -200,6 +200,7 @@ public abstract class World implements IBlockAccess {
2016-03-03 10:46:26 +01:00
this.getServer().addWorld(this.world);
// CraftBukkit end
2016-03-25 05:59:37 +01:00
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
2016-03-01 00:09:49 +01:00
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
2016-03-25 05:59:37 +01:00
}
2016-03-01 00:09:49 +01:00
--
2017-05-14 20:05:01 +02:00
2.13.0
2016-03-01 00:09:49 +01:00