From 386d06426996e04c1a48d131b8a2e8c7c3928902 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 03:51:20 +0000 Subject: [PATCH] Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly [Purpur Changes] PurpurMC/Purpur@3239393: add config for startup commands --- gradle.properties | 2 +- patches/api/0001-Purpur-API-Changes.patch | 2 +- .../server/0001-Purpur-Server-Changes.patch | 87 ++++++++++++------- .../0009-Port-SparklyPaper-patches.patch | 6 +- ...15-Completely-remove-Mojang-Profiler.patch | 18 ++-- patches/server/0033-Add-more-MSPT.patch | 4 +- ...instead-if-server-favicon-doesn-t-ex.patch | 4 +- 7 files changed, 76 insertions(+), 47 deletions(-) diff --git a/gradle.properties b/gradle.properties index f8a1d1d0c..4673ee8d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,4 +24,4 @@ pufferfishBranch = ver/1.20 usePufferfish = false paperCommit = eee55d019fe80372c2e08ccd1d0a94c066cda926 -purpurCommit = 117ed5fcafe0db7048805c27ff003565dc94dd79 +purpurCommit = 3239393f3f11606bb4a850605a745a6d029f0f14 diff --git a/patches/api/0001-Purpur-API-Changes.patch b/patches/api/0001-Purpur-API-Changes.patch index b6034bae9..55f439200 100644 --- a/patches/api/0001-Purpur-API-Changes.patch +++ b/patches/api/0001-Purpur-API-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny -Date: Wed, 8 May 2024 02:02:21 +0000 +Date: Wed, 8 May 2024 03:47:13 +0000 Subject: [PATCH] Purpur API Changes PurpurMC diff --git a/patches/server/0001-Purpur-Server-Changes.patch b/patches/server/0001-Purpur-Server-Changes.patch index aa03ccff2..59ed56a17 100644 --- a/patches/server/0001-Purpur-Server-Changes.patch +++ b/patches/server/0001-Purpur-Server-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny -Date: Wed, 8 May 2024 02:02:20 +0000 +Date: Wed, 8 May 2024 03:47:13 +0000 Subject: [PATCH] Purpur Server Changes PurpurMC @@ -1050,7 +1050,7 @@ index 5443013060b62e3bfcc51cddca96d1c0bc59fe72..411f1f8c6be072cfc5ba88cbec38dbc4 Bootstrap.bootStrap(); Bootstrap.validate(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8dc2f9df367c849ca333bf1a1fd92ff91617b548..dfeae138e830e95ab823b6349a91160b02622208 100644 +index 8dc2f9df367c849ca333bf1a1fd92ff91617b548..21327a92b75a460c7beb3aa408502f37a7db31fa 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -300,6 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1599,20 +1624,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { entityplayer.connection.suspendFlushing(); }); @@ -1320,7 +1337,7 @@ index 8dc2f9df367c849ca333bf1a1fd92ff91617b548..dfeae138e830e95ab823b6349a91160b // Paper start - Folia scheduler API ((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick(); getAllLevels().forEach(level -> { -@@ -1717,22 +1742,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers worldserver.updateLagCompensationTick(); // Paper - lag compensation @@ -1408,7 +1425,7 @@ index 8dc2f9df367c849ca333bf1a1fd92ff91617b548..dfeae138e830e95ab823b6349a91160b } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world"); -@@ -1794,33 +1820,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { this.executeBlocking(() -> { this.saveDebugReport(path.resolve("server")); -@@ -2806,40 +2833,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop List getList(String path, T def) { ++ private static List getList(String path, T def) { + config.addDefault(path, def); + return config.getList(path, config.getList(path)); + } @@ -21345,6 +21362,18 @@ index 0000000000000000000000000000000000000000..f49108ed94f7787347c5e0a721646083 + private static void registerMinecraftDebugCommands() { + registerMinecraftDebugCommands = getBoolean("settings.register-minecraft-debug-commands", registerMinecraftDebugCommands); + } ++ ++ public static List startupCommands = new ArrayList<>(); ++ private static void startupCommands() { ++ startupCommands.clear(); ++ getList("settings.startup-commands", new ArrayList()).forEach(line -> { ++ String command = line.toString(); ++ if (command.startsWith("/")) { ++ command = command.substring(1); ++ } ++ startupCommands.add(command); ++ }); ++ } +} diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java new file mode 100644 diff --git a/patches/server/0009-Port-SparklyPaper-patches.patch b/patches/server/0009-Port-SparklyPaper-patches.patch index d52cd6140..19511660e 100644 --- a/patches/server/0009-Port-SparklyPaper-patches.patch +++ b/patches/server/0009-Port-SparklyPaper-patches.patch @@ -137,7 +137,7 @@ index f164256d59b761264876ca0c85f812d101bfd5de..deaeb134c47da8710afa747bf980bd00 final TrackedChunk chunk = this.byChunk.get(CoordinateUtils.getChunkKey(chunkX, chunkZ)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aa02d9390a90e235476a25db31c915668ebc0ec9..dc64018795a213d6ddbdf2cff465108eff466d55 100644 +index c30bc456caf25fa07dc870eb544469e6d1184169..2213f09a99ea832f59ba802d411f11abfdc8141b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -325,6 +325,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -1733,17 +1734,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2859,12 +2862,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop resultConsumer, Consumer dumpConsumer) { @@ -156,7 +156,7 @@ index dc64018795a213d6ddbdf2cff465108eff466d55..56859a5aebdff201a829b40716c655a0 } public void stopRecordingMetrics() { -@@ -2879,6 +2882,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop loadStatusIcon() {