2020-03-10 12:01:15 +01:00
|
|
|
From 4ccd62f295eda1fe1536551f4630024575784324 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
|
2020-03-10 12:01:15 +01:00
|
|
|
index 284568641..8ee2b9bb1 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
|
2019-10-27 00:55:58 +02:00
|
|
|
@@ -113,4 +113,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
|
2020-03-10 12:01:15 +01:00
|
|
|
index 132c08dd1..7d668759f 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
|
2020-03-10 12:01:15 +01:00
|
|
|
@@ -141,6 +141,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
2019-04-24 03:00:24 +02:00
|
|
|
});
|
2016-03-03 10:46:26 +01:00
|
|
|
// 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
|
2019-04-24 03:00:24 +02:00
|
|
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
2016-03-01 00:09:49 +01:00
|
|
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
2016-03-25 05:59:37 +01:00
|
|
|
}
|
2016-03-01 00:09:49 +01:00
|
|
|
--
|
2020-01-28 20:43:57 +01:00
|
|
|
2.25.0
|
2016-03-01 00:09:49 +01:00
|
|
|
|