From 28ce941fa2307e774b4305d31464337ae67142f5 Mon Sep 17 00:00:00 2001 From: granny Date: Sun, 19 Apr 2026 17:49:36 -0700 Subject: [PATCH] Updated Upstream (Paper) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@78eb3aaf Start discouraging world name use (#13760) PaperMC/Paper@6f4b0045 Add earlier trigger for world migration delay in vanilla logic (#13792) PaperMC/Paper@02ec8e95 [ci/skip] Remove dead disableGameRuleLimits property reading --- gradle.properties | 2 +- .../features/0002-Purpur-config-files.patch | 4 ++-- .../src/main/java/org/bukkit/Server.java.patch | 2 +- .../features/0001-Ridables.patch | 6 +++--- ...riefing-override-to-everything-affected.patch | 4 ++-- ...0-Setting-to-reintroduce-end-void-rings.patch | 4 ++-- .../minecraft/server/MinecraftServer.java.patch | 10 +++++----- .../net/minecraft/world/level/Level.java.patch | 10 +++++----- ...5-Setting-to-reintroduce-end-void-rings.patch | 4 ++-- .../java/org/purpurmc/purpur/PurpurConfig.java | 4 ++-- .../org/purpurmc/purpur/PurpurWorldConfig.java | 16 ++++++++++++++-- 11 files changed, 39 insertions(+), 27 deletions(-) diff --git a/gradle.properties b/gradle.properties index b9b7be1fd..d4a2bf20b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ group = org.purpurmc.purpur mcVersion = 26.1.2 apiVersion = 26.1.2 channel=EXPERIMENTAL -paperCommit = 8987f91c92631c1512cfafddf4eb2d3730ebf1af +paperCommit = 02ec8e9585c44d0ccbdf28495890308e25c045cb org.gradle.configuration-cache = true org.gradle.caching = true diff --git a/purpur-api/paper-patches/features/0002-Purpur-config-files.patch b/purpur-api/paper-patches/features/0002-Purpur-config-files.patch index ed3fca92f..cb9a8eca2 100644 --- a/purpur-api/paper-patches/features/0002-Purpur-config-files.patch +++ b/purpur-api/paper-patches/features/0002-Purpur-config-files.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur config files diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 413ad0c65fad59562413014c3db3f14af5da24a3..09a6042ba0ad63d7479ef48f0a8ddeeb3d9963bb 100644 +index f9fd6bb7e60d31eeb52e0025b9ff4ceb34e789f1..5a3d675862a4a9d6efd86052d13081d6e142f7c4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2440,6 +2440,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2444,6 +2444,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Paper end diff --git a/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch b/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch index 9573d7489..ed0fa258d 100644 --- a/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch +++ b/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch @@ -1,6 +1,6 @@ --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2776,4 +_,125 @@ +@@ -2780,4 +_,125 @@ */ void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value); // Paper end - API to check if the server is sleeping diff --git a/purpur-server/minecraft-patches/features/0001-Ridables.patch b/purpur-server/minecraft-patches/features/0001-Ridables.patch index a0a55052e..2ea107c7b 100644 --- a/purpur-server/minecraft-patches/features/0001-Ridables.patch +++ b/purpur-server/minecraft-patches/features/0001-Ridables.patch @@ -18,10 +18,10 @@ index 64a82b414afd093c010878c150592c681665b735..1db70e2397137158c3df9603ea90743e public boolean isClientAuthoritative() { return false; diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 086cff320cc5ae85c12ab51746233c3aee2264aa..b8572c04a4f979defe8677d64a899b0d2eb252f2 100644 +index 9589fc0621021f900ed62f929b7da69705c91573..0279b1d6456ec271b1fc706a9fb5608de179c383 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1861,6 +1861,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - BlockPhysicsEvent level.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent @@ -30,7 +30,7 @@ index 086cff320cc5ae85c12ab51746233c3aee2264aa..b8572c04a4f979defe8677d64a899b0d net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = level.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers profiler.push(() -> level + " " + level.dimension().identifier()); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 7a3ebe0ec430c2626b099231ef9fe191fce2932d..76f2d334dc5b016a7c1f49db7bf58220a3698cc5 100644 +index 3710e3ff7a65058dd4799459400a5be6bcf19cb8..7898b28dc2ccca20800d989334b625e8a95c935c 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -235,6 +235,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet diff --git a/purpur-server/minecraft-patches/features/0015-Add-mobGriefing-override-to-everything-affected.patch b/purpur-server/minecraft-patches/features/0015-Add-mobGriefing-override-to-everything-affected.patch index daaf734db..25afc59f9 100644 --- a/purpur-server/minecraft-patches/features/0015-Add-mobGriefing-override-to-everything-affected.patch +++ b/purpur-server/minecraft-patches/features/0015-Add-mobGriefing-override-to-everything-affected.patch @@ -359,10 +359,10 @@ index 9293faf988be7013dbeddc9f98beb69a2dac9928..4f1e08c0e3f8ea89a55e02e8f0197fe4 } } diff --git a/net/minecraft/world/level/gamerules/GameRules.java b/net/minecraft/world/level/gamerules/GameRules.java -index 0d0a4008a84defbf1ea962b4e2f73776878956ec..e2fc5dc10c6ab84cb28e2adff2f87c24c8801309 100644 +index 49801f8b037913de5896d4e31a1e36d7ce597875..c333f0ca9c478f8a431fc85c50d6f97435c6d5ea 100644 --- a/net/minecraft/world/level/gamerules/GameRules.java +++ b/net/minecraft/world/level/gamerules/GameRules.java -@@ -128,6 +128,13 @@ public class GameRules { +@@ -121,6 +121,13 @@ public class GameRules { return this.rules.keySet().stream(); } diff --git a/purpur-server/minecraft-patches/features/0020-Setting-to-reintroduce-end-void-rings.patch b/purpur-server/minecraft-patches/features/0020-Setting-to-reintroduce-end-void-rings.patch index cc87fedd7..4cee4e49d 100644 --- a/purpur-server/minecraft-patches/features/0020-Setting-to-reintroduce-end-void-rings.patch +++ b/purpur-server/minecraft-patches/features/0020-Setting-to-reintroduce-end-void-rings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Setting to reintroduce end void rings diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index b8572c04a4f979defe8677d64a899b0d2eb252f2..f336ac13c6a0a2ccfbe5a7bcc6db7f8b33eccbf9 100644 +index 0279b1d6456ec271b1fc706a9fb5608de179c383..a653755f70f5f37b60bdd71f0ef51632cfc00186 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1350,6 +1350,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0L) { final long difference = ticksBehind - catchup; -@@ -1964,7 +_,7 @@ +@@ -1965,7 +_,7 @@ } public String getServerModName() { diff --git a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch index 6490898da..f67f7e8b9 100644 --- a/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch +++ b/purpur-server/minecraft-patches/sources/net/minecraft/world/level/Level.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -170,10 +_,54 @@ +@@ -171,10 +_,54 @@ } // Paper end - add paper world config @@ -55,16 +55,16 @@ public CraftWorld getWorld() { return this.world; } -@@ -850,6 +_,8 @@ +@@ -851,6 +_,8 @@ // Paper end - getblock optimisations - cache world height/sections - this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName); // Spigot + this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, CraftNamespacedKey.fromMinecraft(dimension.identifier())); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config -+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(bukkitName, environment); // Purpur - Purpur config files ++ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(bukkitName, environment, CraftNamespacedKey.fromMinecraft(dimension.identifier())); // Purpur - Purpur config files + this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur - Add adjustable breeding cooldown to config this.generator = generator; this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment); -@@ -2192,4 +_,14 @@ +@@ -2193,4 +_,14 @@ return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system } // Paper end - allow patching this logic diff --git a/purpur-server/paper-patches/features/0005-Setting-to-reintroduce-end-void-rings.patch b/purpur-server/paper-patches/features/0005-Setting-to-reintroduce-end-void-rings.patch index 20fbd8064..191723b3c 100644 --- a/purpur-server/paper-patches/features/0005-Setting-to-reintroduce-end-void-rings.patch +++ b/purpur-server/paper-patches/features/0005-Setting-to-reintroduce-end-void-rings.patch @@ -25,10 +25,10 @@ index e47f279b66b169e2cdf762bb739a261f2acebeb1..cc1906ef871de6a4ff82039d8ddfcd76 } diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java -index e0491ef5cfc06b5c23d448b8c9679a17e58bca26..0d3d9bd2f6aa1284dc237b5169372a2431c85fb8 100644 +index cae151f0c6ecfc0dee3c2f7df29fd2bef075b74f..6df4d6fe4bb9906127d266c156973ac777cae56d 100644 --- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java +++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java -@@ -291,6 +291,7 @@ public class PaperConfigurations extends Configurations(); commands.put("purpur", new PurpurCommand("purpur")); - version = getInt("config-version", 47); - set("config-version", 47); + version = getInt("config-version", 48); + set("config-version", 48); readConfig(PurpurConfig.class, null); diff --git a/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java index 5967be33e..0ead893b9 100644 --- a/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/purpur-server/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -6,6 +6,7 @@ import java.util.HashSet; import java.util.Set; import java.util.function.Predicate; import java.util.logging.Level; +import net.kyori.adventure.key.Key; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.Identifier; import net.minecraft.util.Mth; @@ -19,6 +20,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.properties.Tilt; import org.apache.commons.lang3.BooleanUtils; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.World; import org.bukkit.configuration.ConfigurationSection; @@ -35,16 +37,26 @@ import static org.purpurmc.purpur.PurpurConfig.log; @SuppressWarnings("unused") public class PurpurWorldConfig { + private final String legacyWorldName; private final String worldName; private final World.Environment environment; - public PurpurWorldConfig(String worldName, World.Environment environment) { - this.worldName = worldName; + public PurpurWorldConfig(String legacyWorldName, World.Environment environment, Key worldKey) { + this.legacyWorldName = legacyWorldName; + this.worldName = worldKey.asString(); this.environment = environment; init(); } public void init() { + if (PurpurConfig.version < 48) { + ConfigurationSection section = PurpurConfig.config.getConfigurationSection("world-settings." + this.legacyWorldName); + if (section != null) { + PurpurConfig.config.set("world-settings." + this.legacyWorldName, null); + PurpurConfig.config.set("world-settings." + this.worldName, section); + Bukkit.getLogger().info("NOTE: Migrated Purpur world config %s -> %s".formatted(this.legacyWorldName, this.worldName)); + } + } log("-------- World Settings For [" + worldName + "] --------"); PurpurConfig.readConfig(PurpurWorldConfig.class, this); }