Paper/patches/server/0751-WorldCreator-keepSpawnLoaded.patch

28 Zeilen
1.9 KiB
Diff

2022-04-20 11:26:09 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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 e94c4a5419806e35aaabb88624afe672f93ffa57..583e3cfcd223561d1733c503f84b99edbb4b365e 100644
2022-04-20 11:26:09 +02:00
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1283,7 +1283,7 @@ public final class CraftServer implements Server {
2023-10-27 01:34:58 +02:00
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;
@@ -1295,6 +1295,7 @@ public final class CraftServer implements Server {
2022-04-20 11:26:09 +02:00
internal.setSpawnSettings(true, true);
// Paper - Put world into worldlist before initing the world; move up
2022-04-20 11:26:09 +02:00
+ internal.keepSpawnInMemory = creator.keepSpawnLoaded().toBooleanOrElse(internal.getWorld().getKeepSpawnInMemory()); // Paper
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
2023-09-22 22:13:57 +02:00
//internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system
2022-04-20 11:26:09 +02:00