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
|
2021-11-24 18:58:26 +01:00
|
|
|
index 6ee62d06cc2b59c06d0f7acfb59384075aa6521c..9b908c5c66dc454faa479430a908dda0745638c8 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-11-24 18:58:26 +01:00
|
|
|
@@ -164,4 +164,10 @@ public class PaperWorldConfig {
|
2021-11-09 08:59:15 +01:00
|
|
|
hardDespawnDistances.put(category, hardDistance);
|
|
|
|
}
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ 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
|
2022-02-12 14:20:33 +01:00
|
|
|
index 72fd18a307a7e1f769195c7ef44a12bb47f2f49c..3914d0e21b36a480c68c091478ab282826d2b1ae 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
|
2022-02-12 14:20:33 +01:00
|
|
|
@@ -239,6 +239,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);
|
|
|
|
}
|