2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
|
|
|
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 2f0d582baf0eb2bb477944d0cb1369db6ca33956..89e76dd73811fd0f6f8c8e7e5af804d5a4bb5a75 100644
|
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
@@ -118,4 +118,10 @@ public class PaperWorldConfig {
|
|
|
|
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/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
2021-07-07 08:52:40 +02:00
|
|
|
index e38cd4df0924cce7fee4fd98967990945a62ecf4..a682e7a621b799d0855318788c7f5ad108716256 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
2021-07-07 08:52:40 +02:00
|
|
|
@@ -237,6 +237,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
2021-06-11 14:02:28 +02:00
|
|
|
});
|
|
|
|
// CraftBukkit end
|
|
|
|
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
|
|
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
|
|
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
|
|
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
|
|
|
}
|