2019-06-14 10:27:40 +08:00
|
|
|
From b8b74be9afd42aff05985ff3e7390e8e98f86651 Mon Sep 17 00:00:00 2001
|
2016-03-03 17:46:26 +08:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
2016-03-01 07:09:49 +08: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
|
2019-04-23 12:47:07 +08:00
|
|
|
index 3e1f4be10f..3f734327c0 100644
|
2016-03-01 07:09:49 +08:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2018-07-24 08:24:44 +08:00
|
|
|
@@ -108,4 +108,10 @@ public class PaperWorldConfig {
|
2016-03-01 07:09:49 +08: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
|
2019-06-14 10:27:40 +08:00
|
|
|
index 2a0a7f2480..85056a7b1f 100644
|
2016-03-01 07:09:49 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2019-04-24 09:00:24 +08:00
|
|
|
@@ -152,6 +152,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
|
|
|
});
|
2016-03-03 17:46:26 +08:00
|
|
|
// CraftBukkit end
|
2016-03-25 12:59:37 +08:00
|
|
|
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
2016-03-01 07:09:49 +08:00
|
|
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
2019-04-24 09:00:24 +08:00
|
|
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
2016-03-01 07:09:49 +08:00
|
|
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
2016-03-25 12:59:37 +08:00
|
|
|
}
|
2016-03-01 07:09:49 +08:00
|
|
|
--
|
2019-04-23 12:47:07 +08:00
|
|
|
2.21.0
|
2016-03-01 07:09:49 +08:00
|
|
|
|