aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0734-WorldCreator-keepSpawnLoaded.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0734-WorldCreator-keepSpawnLoaded.patch')
-rw-r--r--patches/server/0734-WorldCreator-keepSpawnLoaded.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0734-WorldCreator-keepSpawnLoaded.patch b/patches/server/0734-WorldCreator-keepSpawnLoaded.patch
new file mode 100644
index 0000000000..97cbe705e8
--- /dev/null
+++ b/patches/server/0734-WorldCreator-keepSpawnLoaded.patch
@@ -0,0 +1,27 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Sat, 3 Jul 2021 21:18:28 +0100
+Subject: [PATCH] WorldCreator#keepSpawnLoaded
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+index 713d36b8bcb3f39f7f0cff61532199416970bcf4..f3b461baac5a5de61f6b1c00251961bd25eb4773 100644
+--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+@@ -1290,7 +1290,7 @@ public final class CraftServer implements Server {
+
+ ServerLevel internal = (ServerLevel) new ServerLevel(this.console, this.console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
+ worlddata.isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, this.console.overworld().getRandomSequences(), creator.environment(), generator, biomeProvider);
+- internal.keepSpawnInMemory = creator.keepSpawnInMemory();
++ // internal.keepSpawnInMemory = creator.keepSpawnInMemory(); // Paper - replace
+
+ if (!(this.worlds.containsKey(name.toLowerCase(java.util.Locale.ENGLISH)))) {
+ return null;
+@@ -1302,6 +1302,7 @@ public final class CraftServer implements Server {
+ internal.setSpawnSettings(true, true);
+ // Paper - Put world into worldlist before initing the world; move up
+
++ internal.keepSpawnInMemory = creator.keepSpawnLoaded().toBooleanOrElse(internal.getWorld().getKeepSpawnInMemory()); // Paper
+ this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
+ internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
+