diff --git a/patches/server/0002-Decompile-fix.patch b/patches/server/0002-Decompile-fix.patch new file mode 100644 index 00000000..59bb2dc3 --- /dev/null +++ b/patches/server/0002-Decompile-fix.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> +Date: Tue, 21 May 2024 19:07:47 +0800 +Subject: [PATCH] Decompile fix + + +diff --git a/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java b/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java +index bc885d2cc95572ec68f1df62555fdba7998b1d93..663b3b12d9a7cdc04b7f86ccfe6bc6fcfd5028bc 100644 +--- a/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java ++++ b/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java +@@ -34,7 +34,7 @@ public interface CustomPacketPayload { + + private void writeCap(B value, CustomPacketPayload.Type id, CustomPacketPayload payload) { + value.writeResourceLocation(id.id()); +- StreamCodec streamCodec = this.findCodec(id.id); ++ StreamCodec streamCodec = (StreamCodec) this.findCodec(id.id); // Leaf - Decompile fix + streamCodec.encode(value, (T)payload); + } + diff --git a/patches/server/0002-Leaf-Config.patch b/patches/server/0003-Leaf-Config.patch similarity index 100% rename from patches/server/0002-Leaf-Config.patch rename to patches/server/0003-Leaf-Config.patch diff --git a/patches/server/0003-Leaf-Config-legacy-converter.patch b/patches/server/0004-Leaf-Config-legacy-converter.patch similarity index 100% rename from patches/server/0003-Leaf-Config-legacy-converter.patch rename to patches/server/0004-Leaf-Config-legacy-converter.patch diff --git a/patches/server/0004-Pufferfish-Utils.patch b/patches/server/0005-Pufferfish-Utils.patch similarity index 100% rename from patches/server/0004-Pufferfish-Utils.patch rename to patches/server/0005-Pufferfish-Utils.patch diff --git a/patches/server/0005-Pufferfish-Sentry.patch b/patches/server/0006-Pufferfish-Sentry.patch similarity index 100% rename from patches/server/0005-Pufferfish-Sentry.patch rename to patches/server/0006-Pufferfish-Sentry.patch diff --git a/patches/server/0006-Pufferfish-Optimize-mob-spawning.patch b/patches/server/0007-Pufferfish-Optimize-mob-spawning.patch similarity index 100% rename from patches/server/0006-Pufferfish-Optimize-mob-spawning.patch rename to patches/server/0007-Pufferfish-Optimize-mob-spawning.patch diff --git a/patches/server/0007-Pufferfish-Dynamic-Activation-of-Brain.patch b/patches/server/0008-Pufferfish-Dynamic-Activation-of-Brain.patch similarity index 99% rename from patches/server/0007-Pufferfish-Dynamic-Activation-of-Brain.patch rename to patches/server/0008-Pufferfish-Dynamic-Activation-of-Brain.patch index 0eeda541..193704c3 100644 --- a/patches/server/0007-Pufferfish-Dynamic-Activation-of-Brain.patch +++ b/patches/server/0008-Pufferfish-Dynamic-Activation-of-Brain.patch @@ -32,7 +32,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index cf51f108753a19e3ab97a6df3e5cecaa4d39f293..cdcbd708b7ee74002428ca8a148d857912ce14ab 100644 +index d27be346b91f390e06702d654058cab4d3f39b8c..e3fdd0677b3029be0ddc5f59489f66e28f5c2853 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -886,6 +886,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -44,7 +44,7 @@ index cf51f108753a19e3ab97a6df3e5cecaa4d39f293..cdcbd708b7ee74002428ca8a148d8579 if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed entity.discard(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 615193fbe7574d4d1d9e24a48655931edc2a35d3..b2396234112460925bc4f308f463d16e92efe679 100644 +index 5613659b44f83d07a253882e227ee1e604695417..9a87e5cb9708dc0879e4fd70d7cecbfea50c730e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -427,6 +427,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0008-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0009-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch similarity index 100% rename from patches/server/0008-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch rename to patches/server/0009-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch diff --git a/patches/server/0009-Pufferfish-Entity-TTL.patch b/patches/server/0010-Pufferfish-Entity-TTL.patch similarity index 97% rename from patches/server/0009-Pufferfish-Entity-TTL.patch rename to patches/server/0010-Pufferfish-Entity-TTL.patch index 3645a43a..c25d4dd6 100644 --- a/patches/server/0009-Pufferfish-Entity-TTL.patch +++ b/patches/server/0010-Pufferfish-Entity-TTL.patch @@ -7,7 +7,7 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b2396234112460925bc4f308f463d16e92efe679..9c20cead889a736aab17ef8ef1f3c932b0dd37f1 100644 +index 9a87e5cb9708dc0879e4fd70d7cecbfea50c730e..66857a4f55c2505228f015764930e3309db3c20a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -868,6 +868,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0010-Purpur-Server-Changes.patch b/patches/server/0011-Purpur-Server-Changes.patch similarity index 100% rename from patches/server/0010-Purpur-Server-Changes.patch rename to patches/server/0011-Purpur-Server-Changes.patch diff --git a/patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch b/patches/server/0012-Fix-Pufferfish-and-Purpur-patches.patch similarity index 100% rename from patches/server/0011-Fix-Pufferfish-and-Purpur-patches.patch rename to patches/server/0012-Fix-Pufferfish-and-Purpur-patches.patch diff --git a/patches/server/0012-Purpur-Configurable-server-mod-name.patch b/patches/server/0013-Purpur-Configurable-server-mod-name.patch similarity index 100% rename from patches/server/0012-Purpur-Configurable-server-mod-name.patch rename to patches/server/0013-Purpur-Configurable-server-mod-name.patch diff --git a/patches/server/0013-Configurable-server-GUI-name.patch b/patches/server/0014-Configurable-server-GUI-name.patch similarity index 100% rename from patches/server/0013-Configurable-server-GUI-name.patch rename to patches/server/0014-Configurable-server-GUI-name.patch diff --git a/patches/server/0014-Remove-Timings.patch b/patches/server/0015-Remove-Timings.patch similarity index 100% rename from patches/server/0014-Remove-Timings.patch rename to patches/server/0015-Remove-Timings.patch diff --git a/patches/server/0015-Bump-Dependencies.patch b/patches/server/0016-Bump-Dependencies.patch similarity index 100% rename from patches/server/0015-Bump-Dependencies.patch rename to patches/server/0016-Bump-Dependencies.patch diff --git a/patches/server/0016-Remove-vanilla-username-check.patch b/patches/server/0017-Remove-vanilla-username-check.patch similarity index 100% rename from patches/server/0016-Remove-vanilla-username-check.patch rename to patches/server/0017-Remove-vanilla-username-check.patch diff --git a/patches/server/0017-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch b/patches/server/0018-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch similarity index 100% rename from patches/server/0017-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch rename to patches/server/0018-Remove-Spigot-Check-for-Broken-BungeeCord-Configurat.patch diff --git a/patches/server/0018-Remove-UseItemOnPacket-Too-Far-Check.patch b/patches/server/0019-Remove-UseItemOnPacket-Too-Far-Check.patch similarity index 97% rename from patches/server/0018-Remove-UseItemOnPacket-Too-Far-Check.patch rename to patches/server/0019-Remove-UseItemOnPacket-Too-Far-Check.patch index c8910080..03cf6045 100644 --- a/patches/server/0018-Remove-UseItemOnPacket-Too-Far-Check.patch +++ b/patches/server/0019-Remove-UseItemOnPacket-Too-Far-Check.patch @@ -7,7 +7,7 @@ This Check is added in 1.17.x -> 1.18.x update by Mojang. By removing this check, it enable hackers to use some modules of hack clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a42431f9788fbb75eb3daae4b7be7f8261056dcc..479fe0a14736a2eec61a7d50b7afbacc548c06e2 100644 +index c53e01260b4ca6f637b3d55798cda4cab822b5fe..d107cd93a6d43f060a7bcfc4a3ee0c82c51bc9b9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2008,7 +2008,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0019-KTP-Allow-unknown-event-thread-execution.patch b/patches/server/0020-KTP-Allow-unknown-event-thread-execution.patch similarity index 100% rename from patches/server/0019-KTP-Allow-unknown-event-thread-execution.patch rename to patches/server/0020-KTP-Allow-unknown-event-thread-execution.patch diff --git a/patches/server/0020-KeYi-Player-Skull-API.patch b/patches/server/0021-KeYi-Player-Skull-API.patch similarity index 100% rename from patches/server/0020-KeYi-Player-Skull-API.patch rename to patches/server/0021-KeYi-Player-Skull-API.patch diff --git a/patches/server/0021-KeYi-Disable-arrow-despawn-counter-by-default.patch b/patches/server/0022-KeYi-Disable-arrow-despawn-counter-by-default.patch similarity index 100% rename from patches/server/0021-KeYi-Disable-arrow-despawn-counter-by-default.patch rename to patches/server/0022-KeYi-Disable-arrow-despawn-counter-by-default.patch diff --git a/patches/server/0022-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch b/patches/server/0023-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch similarity index 100% rename from patches/server/0022-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch rename to patches/server/0023-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch diff --git a/patches/server/0023-Carpet-Fixes-Optimized-getBiome-method.patch b/patches/server/0024-Carpet-Fixes-Optimized-getBiome-method.patch similarity index 100% rename from patches/server/0023-Carpet-Fixes-Optimized-getBiome-method.patch rename to patches/server/0024-Carpet-Fixes-Optimized-getBiome-method.patch diff --git a/patches/server/0024-Carpet-Fixes-Use-optimized-RecipeManager.patch b/patches/server/0025-Carpet-Fixes-Use-optimized-RecipeManager.patch similarity index 100% rename from patches/server/0024-Carpet-Fixes-Use-optimized-RecipeManager.patch rename to patches/server/0025-Carpet-Fixes-Use-optimized-RecipeManager.patch diff --git a/patches/server/0025-Rail-Optimization-optimized-PoweredRailBlock-logic.patch b/patches/server/0026-Rail-Optimization-optimized-PoweredRailBlock-logic.patch similarity index 100% rename from patches/server/0025-Rail-Optimization-optimized-PoweredRailBlock-logic.patch rename to patches/server/0026-Rail-Optimization-optimized-PoweredRailBlock-logic.patch diff --git a/patches/server/0026-Akarin-Save-Json-list-asynchronously.patch b/patches/server/0027-Akarin-Save-Json-list-asynchronously.patch similarity index 100% rename from patches/server/0026-Akarin-Save-Json-list-asynchronously.patch rename to patches/server/0027-Akarin-Save-Json-list-asynchronously.patch diff --git a/patches/server/0027-Slice-Smooth-Teleports.patch b/patches/server/0028-Slice-Smooth-Teleports.patch similarity index 93% rename from patches/server/0027-Slice-Smooth-Teleports.patch rename to patches/server/0028-Slice-Smooth-Teleports.patch index d0293dde..74b63eba 100644 --- a/patches/server/0027-Slice-Smooth-Teleports.patch +++ b/patches/server/0028-Slice-Smooth-Teleports.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/Cryptite/Slice diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 2707bc1dc8b45a239ffe0b0aeffe96a1359b9a5c..7fc94ec08f6bd9649ad9168ea3b9aa6ac9bf60e0 100644 +index 89200d0e0ff60514d22c1cde4b5222917f066323..3bbb3b5444976c859d7f357aa4283947b45f3100 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -303,6 +303,7 @@ public class ServerPlayer extends Player { @@ -19,7 +19,7 @@ index 2707bc1dc8b45a239ffe0b0aeffe96a1359b9a5c..7fc94ec08f6bd9649ad9168ea3b9aa6a // Paper start - replace player chunk loader private final java.util.concurrent.atomic.AtomicReference viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c9673051ce9f4096b981087eefe8b72bbe34819a..07b9f53d49d9ba8bbd3fa3da99bb7cd05510a00c 100644 +index 9250db41e26d2ffa96146782e898165591f9e819..2e98c6598e589b498991c745058db3c0efb9cbf6 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -969,10 +969,10 @@ public abstract class PlayerList { @@ -36,7 +36,7 @@ index c9673051ce9f4096b981087eefe8b72bbe34819a..07b9f53d49d9ba8bbd3fa3da99bb7cd0 entityplayer1.connection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); entityplayer1.connection.send(new ClientboundSetExperiencePacket(entityplayer1.experienceProgress, entityplayer1.totalExperience, entityplayer1.experienceLevel)); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1e5fb608ff04d2e9ae8db30896eb88fde914b8af..507faaf2578d49c900ed8a3d9ab995695d47142d 100644 +index f2f6184589c72b82d041abae2c978edf084cc63f..bbbac669bcadd596ad40a0eed99e2587db9c900e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1347,6 +1347,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0028-Parchment-Make-FixLight-use-action-bar.patch b/patches/server/0029-Parchment-Make-FixLight-use-action-bar.patch similarity index 100% rename from patches/server/0028-Parchment-Make-FixLight-use-action-bar.patch rename to patches/server/0029-Parchment-Make-FixLight-use-action-bar.patch diff --git a/patches/server/0029-Leaves-Server-Utils.patch b/patches/server/0030-Leaves-Server-Utils.patch similarity index 98% rename from patches/server/0029-Leaves-Server-Utils.patch rename to patches/server/0030-Leaves-Server-Utils.patch index 383130f5..143a21d5 100644 --- a/patches/server/0029-Leaves-Server-Utils.patch +++ b/patches/server/0030-Leaves-Server-Utils.patch @@ -6,6 +6,8 @@ Subject: [PATCH] Leaves: Server Utils Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves +Commit: 87bfa2d2bbc597c8351ec8776b14c5a6166ed01c + diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 47928af7b85543fe74ad7272286df4e8b1921426..638709c6393cb7f3ca4e3328b50ae8c0294953e1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/patches/unapplied/server/0030-Leaves-Protocol-Core.patch b/patches/server/0031-Leaves-Protocol-Core.patch similarity index 67% rename from patches/unapplied/server/0030-Leaves-Protocol-Core.patch rename to patches/server/0031-Leaves-Protocol-Core.patch index 53cbf302..7e3d3168 100644 --- a/patches/unapplied/server/0030-Leaves-Protocol-Core.patch +++ b/patches/server/0031-Leaves-Protocol-Core.patch @@ -8,104 +8,154 @@ TODO - Dreeam: Configurable leaves protocol listening Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves -diff --git a/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java b/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java -index 1789c0c71d968b386060bd6dc2630e8a078c32e2..b83148a78306333949ac354311400bb971c212b5 100644 ---- a/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/login/ClientboundCustomQueryPacket.java -@@ -19,6 +19,13 @@ public record ClientboundCustomQueryPacket(int transactionId, CustomQueryPayload - } +Commit: 87bfa2d2bbc597c8351ec8776b14c5a6166ed01c + +diff --git a/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java b/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java +index 663b3b12d9a7cdc04b7f86ccfe6bc6fcfd5028bc..a58ad6f41fc0eacf020e9ab6c8e5f7dfc4977f8d 100644 +--- a/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java ++++ b/src/main/java/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java +@@ -40,13 +40,23 @@ public interface CustomPacketPayload { - private static CustomQueryPayload readPayload(ResourceLocation id, FriendlyByteBuf buf) { -+ // Leaves start - protocol -+ CustomQueryPayload leavesPayload = (CustomQueryPayload) top.leavesmc.leaves.protocol.core.LeavesProtocolManager.getPayload(id, buf); -+ if (leavesPayload != null) { -+ return leavesPayload; -+ } -+ // Leaves end - protocol -+ - return readUnknownPayload(id, buf); - } + @Override + public void encode(B friendlyByteBuf, CustomPacketPayload customPacketPayload) { ++ // Leaves start - protocol core ++ if (customPacketPayload instanceof org.leavesmc.leaves.protocol.core.LeavesCustomPayload leavesCustomPayload) { ++ friendlyByteBuf.writeResourceLocation(leavesCustomPayload.id()); ++ leavesCustomPayload.write(friendlyByteBuf); ++ return; ++ } ++ // Leaves end - protocol core + this.writeCap(friendlyByteBuf, customPacketPayload.type(), customPacketPayload); + } + @Override + public CustomPacketPayload decode(B friendlyByteBuf) { + ResourceLocation resourceLocation = friendlyByteBuf.readResourceLocation(); +- return (CustomPacketPayload)this.findCodec(resourceLocation).decode(friendlyByteBuf); ++ // Leaves start - protocol core ++ var leavesCustomPayload = org.leavesmc.leaves.protocol.core.LeavesProtocolManager.decode(resourceLocation, friendlyByteBuf); ++ return java.util.Objects.requireNonNullElseGet(leavesCustomPayload, () -> (CustomPacketPayload) this.findCodec(resourceLocation).decode(friendlyByteBuf)); ++ // Leaves end - protocol core + } + }; + } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 10e3eb23c00b2af646f198f789129814beb656b1..f5f69df14049716aab0856ed9b7041dc80d6ee31 100644 +index 50a275352bdd3a1deef925930b57acf176ddb2ed..c7f44250b1801c581420f93d357d64f615949691 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1779,6 +1779,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop leavesPayload) { ++ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePayload(player, leavesPayload); ++ } ++ // Leaves end - protocol // Paper start - Brand support if (packet.payload() instanceof net.minecraft.network.protocol.common.custom.BrandPayload brandPayload) { this.player.clientBrandName = brandPayload.brand(); -@@ -185,6 +186,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -185,6 +190,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack String channels = payload.toString(com.google.common.base.Charsets.UTF_8); for (String channel : channels.split("\0")) { this.getCraftPlayer().addChannel(channel); -+ top.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleMinecraftRegister(channel, player); // Leaves - protocol ++ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleMinecraftRegister(channel, player); // Leaves - protocol } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 07b9f53d49d9ba8bbd3fa3da99bb7cd05510a00c..1be9b74bc028ea835aaf4ceb70e8619a02aa9725 100644 +index 2e98c6598e589b498991c745058db3c0efb9cbf6..0d65a53b23c82cbc4539afd28c52b5fd2d2ff5b4 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -364,6 +364,7 @@ public abstract class PlayerList { - } +@@ -365,6 +365,8 @@ public abstract class PlayerList { player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined -+ top.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerJoin(player); // Leaves - protocol ++ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerJoin(player); // Leaves - protocol ++ final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); -@@ -618,6 +619,7 @@ public abstract class PlayerList { + if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure +@@ -618,6 +620,7 @@ public abstract class PlayerList { return this.remove(entityplayer, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer, net.kyori.adventure.text.Component leaveMessage) { -+ top.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerLeave(entityplayer); // Leaves - protocol ++ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerLeave(entityplayer); // Leaves - protocol // Paper end - Fix kick event leave message not being sent org.purpurmc.purpur.task.BossBarTask.removeFromAll(entityplayer.getBukkitEntity()); // Purpur ServerLevel worldserver = entityplayer.serverLevel(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f17eb11741d09f9b04eac98918261680b600749a..9837cc3b014ab98b2cb50bd244d2e0e71412249f 100644 +index 5a5619667e68379b810bf8c2912a8c64caa38991..e9475b7761af84b97f522698a304f0b1ccc134a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -483,6 +483,7 @@ public final class CraftServer implements Server { +@@ -485,6 +485,7 @@ public final class CraftServer implements Server { } this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper -+ top.leavesmc.leaves.protocol.core.LeavesProtocolManager.init(); // Leaves - protocol ++ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.init(); // Leaves - protocol } public boolean getCommandBlockOverride(String command) { -@@ -1107,6 +1108,7 @@ public final class CraftServer implements Server { +@@ -1087,6 +1088,7 @@ public final class CraftServer implements Server { org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -+ top.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleServerReload(); // Leaves - protocol ++ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleServerReload(); // Leaves - protocol int pollCount = 0; -diff --git a/src/main/java/top/leavesmc/leaves/protocol/core/LeavesProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/core/LeavesProtocol.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/LeavesCustomPayload.java b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesCustomPayload.java new file mode 100644 -index 0000000000000000000000000000000000000000..f884f54f5a1f0665c290e014f088aae857cecef8 +index 0000000000000000000000000000000000000000..243a8d77d67b9634d6442b60e481d18831367a74 --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/core/LeavesProtocol.java ++++ b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesCustomPayload.java +@@ -0,0 +1,26 @@ ++package org.leavesmc.leaves.protocol.core; ++ ++import net.minecraft.network.FriendlyByteBuf; ++import net.minecraft.network.protocol.common.custom.CustomPacketPayload; ++import net.minecraft.resources.ResourceLocation; ++import org.jetbrains.annotations.NotNull; ++ ++import java.lang.annotation.Retention; ++import java.lang.annotation.RetentionPolicy; ++ ++public interface LeavesCustomPayload> extends CustomPacketPayload { ++ ++ @Retention(RetentionPolicy.RUNTIME) ++ @interface New { ++ } ++ ++ void write(FriendlyByteBuf buf); ++ ++ ResourceLocation id(); ++ ++ @Override ++ @NotNull ++ default Type type() { ++ return new CustomPacketPayload.Type<>(id()); ++ } ++} +diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocol.java +new file mode 100644 +index 0000000000000000000000000000000000000000..986d2a6641ff8017dddf3e5f2655adfc2866c119 +--- /dev/null ++++ b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocol.java @@ -0,0 +1,12 @@ -+package top.leavesmc.leaves.protocol.core; ++package org.leavesmc.leaves.protocol.core; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; @@ -117,23 +167,22 @@ index 0000000000000000000000000000000000000000..f884f54f5a1f0665c290e014f088aae8 +public @interface LeavesProtocol { + String[] namespace(); +} -diff --git a/src/main/java/top/leavesmc/leaves/protocol/core/LeavesProtocolManager.java b/src/main/java/top/leavesmc/leaves/protocol/core/LeavesProtocolManager.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java new file mode 100644 -index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd92512e4a +index 0000000000000000000000000000000000000000..2356bb3bc68d2a33329b7c4a41b48f1a52576ccb --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/core/LeavesProtocolManager.java -@@ -0,0 +1,361 @@ -+package top.leavesmc.leaves.protocol.core; ++++ b/src/main/java/org/leavesmc/leaves/protocol/core/LeavesProtocolManager.java +@@ -0,0 +1,368 @@ ++package org.leavesmc.leaves.protocol.core; + +import net.minecraft.network.FriendlyByteBuf; -+import net.minecraft.network.protocol.common.ServerboundCustomPayloadPacket; -+import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import org.apache.commons.lang.ArrayUtils; -+import org.jetbrains.annotations.NotNull; -+ +import org.bukkit.event.player.PlayerKickEvent; ++import org.apache.logging.log4j.LogManager; ++import org.apache.logging.log4j.Logger; ++import org.jetbrains.annotations.NotNull; + +import java.io.File; +import java.io.IOException; @@ -160,7 +209,9 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + +public class LeavesProtocolManager { + -+ private static final Map>> KNOWN_TYPES = new HashMap<>(); ++ private static final Logger LOGGER = LogManager.getLogger("Leaves"); ++ ++ private static final Map>>> KNOWN_TYPES = new HashMap<>(); + private static final Map> KNOW_RECEIVERS = new HashMap<>(); + + private static final List TICKERS = new ArrayList<>(); @@ -170,7 +221,7 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + private static final Map> MINECRAFT_REGISTER = new HashMap<>(); + + public static void init() { -+ for (Class clazz : getClasses("top.leavesmc.leaves.protocol")) { ++ for (Class clazz : getClasses("org.leavesmc.leaves.protocol")) { + final LeavesProtocol protocol = clazz.getAnnotation(LeavesProtocol.class); + if (protocol != null) { + Set methods; @@ -180,12 +231,12 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + methods = new HashSet<>(publicMethods.length + privateMethods.length, 1.0f); + Collections.addAll(methods, publicMethods); + Collections.addAll(methods, privateMethods); -+ } catch (NoClassDefFoundError e) { -+ e.printStackTrace(); ++ } catch (NoClassDefFoundError error) { ++ LOGGER.fatal("Failed to load class {} due to missing dependencies, {}", clazz.getName(), error.getMessage()); + return; + } + -+ Map> map = KNOWN_TYPES.getOrDefault(protocol, new HashMap<>()); ++ Map>> map = KNOWN_TYPES.getOrDefault(protocol, new HashMap<>()); + for (final Method method : methods) { + if (method.isBridge() || method.isSynthetic() || !Modifier.isStatic(method.getModifiers())) { + continue; @@ -197,8 +248,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + if (init != null) { + try { + method.invoke(null); -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.fatal("Failed to invoke init method {} in {}, {}", method.getName(), clazz.getName(), exception.getMessage()); + } + continue; + } @@ -206,9 +257,16 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + final ProtocolHandler.PayloadReceiver receiver = method.getAnnotation(ProtocolHandler.PayloadReceiver.class); + if (receiver != null) { + try { -+ map.put(receiver, receiver.payload().getConstructor(ResourceLocation.class, FriendlyByteBuf.class)); -+ } catch (NoSuchMethodException e) { -+ e.printStackTrace(); ++ Constructor> constructor = receiver.payload().getConstructor(ResourceLocation.class, FriendlyByteBuf.class); ++ constructor.setAccessible(true); ++ ++ if (constructor.getAnnotation(LeavesCustomPayload.New.class) == null) { ++ LOGGER.warn("Failed to find new annotation for {}", receiver.payload().getName()); ++ } ++ ++ map.put(receiver, constructor); ++ } catch (NoSuchMethodException exception) { ++ LOGGER.fatal("Failed to find constructor for {}, {}", receiver.payload().getName(), exception.getMessage()); + continue; + } + @@ -258,19 +316,19 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + } + } + -+ public static CustomPacketPayload getPayload(ResourceLocation id, FriendlyByteBuf buf) { ++ public static LeavesCustomPayload decode(ResourceLocation id, FriendlyByteBuf buf) { + for (LeavesProtocol protocol : KNOWN_TYPES.keySet()) { + if (!ArrayUtils.contains(protocol.namespace(), id.getNamespace())) { + continue; + } + -+ Map> map = KNOWN_TYPES.get(protocol); ++ Map>> map = KNOWN_TYPES.get(protocol); + for (ProtocolHandler.PayloadReceiver receiver : map.keySet()) { + if (receiver.ignoreId() || ArrayUtils.contains(receiver.payloadId(), id.getPath())) { + try { + return map.get(receiver).newInstance(id, buf); -+ } catch (InvocationTargetException | InstantiationException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | InstantiationException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to create payload for {} in {}, {}", id, ArrayUtils.toString(protocol.namespace()), exception.getMessage()); + buf.readBytes(buf.readableBytes()); + return new ErrorPayload(id, protocol.namespace(), receiver.payloadId()); + } @@ -280,29 +338,25 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + return null; + } + -+ public static void handlePayload(ServerPlayer player, CustomPacketPayload payload) { -+ if (payload instanceof ServerboundCustomPayloadPacket.UnknownPayload) { -+ return; -+ } -+ ++ public static void handlePayload(ServerPlayer player, LeavesCustomPayload payload) { + if (payload instanceof ErrorPayload errorPayload) { + player.connection.disconnect("Payload " + Arrays.toString(errorPayload.packetID) + " from " + Arrays.toString(errorPayload.protocolID) + " error", PlayerKickEvent.Cause.INVALID_PAYLOAD); + return; + } + + for (LeavesProtocol protocol : KNOW_RECEIVERS.keySet()) { -+ if (!ArrayUtils.contains(protocol.namespace(), payload.id().getNamespace())) { ++ if (!ArrayUtils.contains(protocol.namespace(), payload.type().id().getNamespace())) { + continue; + } + + Map map = KNOW_RECEIVERS.get(protocol); + for (ProtocolHandler.PayloadReceiver receiver : map.keySet()) { + if (payload.getClass() == receiver.payload()) { -+ if (receiver.ignoreId() || ArrayUtils.contains(receiver.payloadId(), payload.id().getPath())) { ++ if (receiver.ignoreId() || ArrayUtils.contains(receiver.payloadId(), payload.type().id().getPath())) { + try { + map.get(receiver).invoke(null, player, payload); -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to handle payload {} in {}, {}", payload.type().id(), ArrayUtils.toString(protocol.namespace()), exception.getMessage()); + } + } + } @@ -316,8 +370,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + for (Method method : TICKERS) { + method.invoke(null); + } -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to tick, {}", exception.getMessage()); + } + } + } @@ -328,8 +382,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + for (Method method : PLAYER_JOIN) { + method.invoke(null, player); + } -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to handle player join, {}", exception.getMessage()); + } + } + } @@ -340,8 +394,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + for (Method method : PLAYER_LEAVE) { + method.invoke(null, player); + } -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to handle player leave, {}", exception.getMessage()); + } + } + } @@ -352,8 +406,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + for (Method method : RELOAD_SERVER) { + method.invoke(null); + } -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to handle server reload, {}", exception.getMessage()); + } + } + } @@ -368,11 +422,11 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + Map map = MINECRAFT_REGISTER.get(protocol); + for (ProtocolHandler.MinecraftRegister register : map.keySet()) { + if (register.ignoreId() || register.channelId().equals(channel[1]) || -+ ArrayUtils.contains(register.channelIds(), channel[1])) { ++ ArrayUtils.contains(register.channelIds(), channel[1])) { + try { + map.get(register).invoke(null, player); -+ } catch (InvocationTargetException | IllegalAccessException e) { -+ e.printStackTrace(); ++ } catch (InvocationTargetException | IllegalAccessException exception) { ++ LOGGER.warn("Failed to handle minecraft register, {}", exception.getMessage()); + } + } + } @@ -380,7 +434,7 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + } + + public static Set> getClasses(String pack) { -+ Set> classes = new LinkedHashSet>(); ++ Set> classes = new LinkedHashSet<>(); + String packageDirName = pack.replace('.', '/'); + Enumeration dirs; + try { @@ -397,13 +451,13 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + jar = ((JarURLConnection) url.openConnection()).getJarFile(); + Enumeration entries = jar.entries(); + findClassesInPackageByJar(pack, entries, packageDirName, classes); -+ } catch (IOException e) { -+ e.printStackTrace(); ++ } catch (IOException exception) { ++ LOGGER.warn("Failed to load jar file, {}", exception.getMessage()); + } + } + } -+ } catch (IOException e) { -+ e.printStackTrace(); ++ } catch (IOException exception) { ++ LOGGER.warn("Failed to load classes, {}", exception.getMessage()); + } + return classes; + } @@ -422,8 +476,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + String className = file.getName().substring(0, file.getName().length() - 6); + try { + classes.add(Class.forName(packageName + '.' + className)); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); ++ } catch (ClassNotFoundException exception) { ++ LOGGER.warn("Failed to load class {}, {}", className, exception.getMessage()); + } + } + } @@ -446,8 +500,8 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + String className = name.substring(packageName.length() + 1, name.length() - 6); + try { + classes.add(Class.forName(packageName + '.' + className)); -+ } catch (ClassNotFoundException e) { -+ e.printStackTrace(); ++ } catch (ClassNotFoundException exception) { ++ LOGGER.warn("Failed to load class {}, {}", className, exception.getMessage()); + } + } + } @@ -455,14 +509,15 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + } + + public record ErrorPayload(ResourceLocation id, String[] protocolID, -+ String[] packetID) implements CustomPacketPayload { ++ String[] packetID) implements LeavesCustomPayload { + @Override + public void write(@NotNull FriendlyByteBuf buf) { + } + } + -+ public record EmptyPayload(ResourceLocation id) implements CustomPacketPayload { ++ public record EmptyPayload(ResourceLocation id) implements LeavesCustomPayload { + ++ @LeavesCustomPayload.New + public EmptyPayload(ResourceLocation location, FriendlyByteBuf buf) { + this(location); + } @@ -472,8 +527,10 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + } + } + -+ public record LeavesPayload(FriendlyByteBuf data, ResourceLocation id) implements CustomPacketPayload { ++ public record LeavesPayload(FriendlyByteBuf data, ++ ResourceLocation id) implements LeavesCustomPayload { + ++ @LeavesCustomPayload.New + public LeavesPayload(ResourceLocation location, FriendlyByteBuf buf) { + this(new FriendlyByteBuf(buf.readBytes(buf.readableBytes())), location); + } @@ -484,15 +541,13 @@ index 0000000000000000000000000000000000000000..740039a14fe915e7edd30273de628efd + } + } +} -diff --git a/src/main/java/top/leavesmc/leaves/protocol/core/ProtocolHandler.java b/src/main/java/top/leavesmc/leaves/protocol/core/ProtocolHandler.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/ProtocolHandler.java b/src/main/java/org/leavesmc/leaves/protocol/core/ProtocolHandler.java new file mode 100644 -index 0000000000000000000000000000000000000000..92ad6e9b1c0d9640b80c1ebe739c613d989eec21 +index 0000000000000000000000000000000000000000..f9dc0a60ca4287e5ec91dd3fc1ae315e2826da34 --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/core/ProtocolHandler.java -@@ -0,0 +1,63 @@ -+package top.leavesmc.leaves.protocol.core; -+ -+import net.minecraft.network.protocol.common.custom.CustomPacketPayload; ++++ b/src/main/java/org/leavesmc/leaves/protocol/core/ProtocolHandler.java +@@ -0,0 +1,61 @@ ++package org.leavesmc.leaves.protocol.core; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; @@ -511,7 +566,7 @@ index 0000000000000000000000000000000000000000..92ad6e9b1c0d9640b80c1ebe739c613d + @Retention(RetentionPolicy.RUNTIME) + public @interface PayloadReceiver { + -+ Class payload(); ++ Class> payload(); + + String[] payloadId(); + @@ -553,13 +608,13 @@ index 0000000000000000000000000000000000000000..92ad6e9b1c0d9640b80c1ebe739c613d + boolean ignoreId() default false; + } +} -diff --git a/src/main/java/top/leavesmc/leaves/protocol/core/ProtocolUtils.java b/src/main/java/top/leavesmc/leaves/protocol/core/ProtocolUtils.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/core/ProtocolUtils.java b/src/main/java/org/leavesmc/leaves/protocol/core/ProtocolUtils.java new file mode 100644 -index 0000000000000000000000000000000000000000..5282c5ad3d26d06ab685ddaaf6fd9a4d49559717 +index 0000000000000000000000000000000000000000..562f3d515679965571597945e8682712e1e1f0b9 --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/core/ProtocolUtils.java -@@ -0,0 +1,36 @@ -+package top.leavesmc.leaves.protocol.core; ++++ b/src/main/java/org/leavesmc/leaves/protocol/core/ProtocolUtils.java +@@ -0,0 +1,37 @@ ++package org.leavesmc.leaves.protocol.core; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket; @@ -576,8 +631,9 @@ index 0000000000000000000000000000000000000000..5282c5ad3d26d06ab685ddaaf6fd9a4d + player.connection.send(new ClientboundCustomPayloadPacket(new LeavesProtocolManager.EmptyPayload(id))); + } + -+ public static void sendPayloadPacket(ServerPlayer player, ResourceLocation id, Consumer consumer) { -+ player.connection.send(new ClientboundCustomPayloadPacket(new CustomPacketPayload() { ++ @SuppressWarnings("all") ++ public static void sendPayloadPacket(@NotNull ServerPlayer player, ResourceLocation id, Consumer consumer) { ++ player.connection.send(new ClientboundCustomPayloadPacket(new LeavesCustomPayload() { + @Override + public void write(@NotNull FriendlyByteBuf buf) { + consumer.accept(buf); diff --git a/patches/unapplied/server/0032-Leaves-Appleskin-Protocol.patch b/patches/server/0032-Leaves-Appleskin-Protocol.patch similarity index 80% rename from patches/unapplied/server/0032-Leaves-Appleskin-Protocol.patch rename to patches/server/0032-Leaves-Appleskin-Protocol.patch index 68da584e..f457b840 100644 --- a/patches/unapplied/server/0032-Leaves-Appleskin-Protocol.patch +++ b/patches/server/0032-Leaves-Appleskin-Protocol.patch @@ -6,27 +6,44 @@ Subject: [PATCH] Leaves: Appleskin Protocol Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves +Commit: 87bfa2d2bbc597c8351ec8776b14c5a6166ed01c + This patch is Powered by AppleSkin (https://github.com/squeek502/AppleSkin) diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index b63d87d0593d116b0c5ee835dc4372f1b5542453..ef23577faaf7948d7a9b1def4d56506eab19cc80 100644 ---- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +new file mode 100644 +index 0000000000000000000000000000000000000000..1181ffae40b86a4212e199814d3e07e641a5a1f2 +--- /dev/null +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -@@ -18,4 +18,7 @@ public class ProtocolSupport implements IConfigModule { - - @ConfigInfo(baseName = "jade-protocol") - public static boolean jadeProtocol = false; +@@ -0,0 +1,21 @@ ++package org.dreeam.leaf.config.modules.network; ++ ++import org.dreeam.leaf.config.ConfigInfo; ++import org.dreeam.leaf.config.EnumConfigCategory; ++import org.dreeam.leaf.config.IConfigModule; ++ ++public class ProtocolSupport implements IConfigModule { ++ ++ @Override ++ public EnumConfigCategory getCategory() { ++ return EnumConfigCategory.NETWORK; ++ } ++ ++ @Override ++ public String getBaseName() { ++ return "protocol_support"; ++ } + + @ConfigInfo(baseName = "appleskin-protocol") + public static boolean appleskinProtocol = false; - } -diff --git a/src/main/java/top/leavesmc/leaves/protocol/AppleSkinProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/AppleSkinProtocol.java ++} +diff --git a/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java new file mode 100644 -index 0000000000000000000000000000000000000000..2e7ad52155b4308a0361c3cdc0ecec97f912ef7f +index 0000000000000000000000000000000000000000..c496c97c99cd352c2566731d3017cf1b14ee74ec --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/AppleSkinProtocol.java ++++ b/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java @@ -0,0 +1,105 @@ -+package top.leavesmc.leaves.protocol; ++package org.leavesmc.leaves.protocol; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.MinecraftServer; @@ -34,9 +51,9 @@ index 0000000000000000000000000000000000000000..2e7ad52155b4308a0361c3cdc0ecec97 +import net.minecraft.world.food.FoodData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; -+import top.leavesmc.leaves.protocol.core.LeavesProtocol; -+import top.leavesmc.leaves.protocol.core.ProtocolHandler; -+import top.leavesmc.leaves.protocol.core.ProtocolUtils; ++import org.leavesmc.leaves.protocol.core.LeavesProtocol; ++import org.leavesmc.leaves.protocol.core.ProtocolHandler; ++import org.leavesmc.leaves.protocol.core.ProtocolUtils; + +import java.util.HashMap; +import java.util.HashSet; diff --git a/patches/unapplied/server/0033-Leaves-Xaero-Map-Protocol.patch b/patches/server/0033-Leaves-Xaero-Map-Protocol.patch similarity index 81% rename from patches/unapplied/server/0033-Leaves-Xaero-Map-Protocol.patch rename to patches/server/0033-Leaves-Xaero-Map-Protocol.patch index cdff1700..b77b12fa 100644 --- a/patches/unapplied/server/0033-Leaves-Xaero-Map-Protocol.patch +++ b/patches/server/0033-Leaves-Xaero-Map-Protocol.patch @@ -6,22 +6,24 @@ Subject: [PATCH] Leaves: Xaero Map Protocol Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves +Commit: 87bfa2d2bbc597c8351ec8776b14c5a6166ed01c + This patch is Powered by Xaero Map diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1be9b74bc028ea835aaf4ceb70e8619a02aa9725..9e93de5fa378b1625679595771ce18c3ab9628a2 100644 +index 0d65a53b23c82cbc4539afd28c52b5fd2d2ff5b4..c410f781371a87ecc2849144c747a6ac3182a65a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1375,6 +1375,7 @@ public abstract class PlayerList { +@@ -1376,6 +1376,7 @@ public abstract class PlayerList { player.connection.send(new ClientboundInitializeBorderPacket(worldborder)); player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle())); -+ top.leavesmc.leaves.protocol.XaeroMapProtocol.onSendWorldInfo(player); // Leaves - xaero map protocol ++ org.leavesmc.leaves.protocol.XaeroMapProtocol.onSendWorldInfo(player); // Leaves - xaero map protocol if (world.isRaining()) { // CraftBukkit start - handle player weather // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F)); diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index ef23577faaf7948d7a9b1def4d56506eab19cc80..c9736e79387d785a67d6ebe71df6553eeaf2b41d 100644 +index 1181ffae40b86a4212e199814d3e07e641a5a1f2..be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709 100644 --- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java @@ -4,6 +4,8 @@ import org.dreeam.leaf.config.ConfigInfo; @@ -33,7 +35,7 @@ index ef23577faaf7948d7a9b1def4d56506eab19cc80..c9736e79387d785a67d6ebe71df6553e public class ProtocolSupport implements IConfigModule { @Override -@@ -21,4 +23,9 @@ public class ProtocolSupport implements IConfigModule { +@@ -18,4 +20,9 @@ public class ProtocolSupport implements IConfigModule { @ConfigInfo(baseName = "appleskin-protocol") public static boolean appleskinProtocol = false; @@ -43,20 +45,20 @@ index ef23577faaf7948d7a9b1def4d56506eab19cc80..c9736e79387d785a67d6ebe71df6553e + @ConfigInfo(baseName = "xaero-map-server-id") + public static int xaeroMapServerID = new Random().nextInt(); } -diff --git a/src/main/java/top/leavesmc/leaves/protocol/XaeroMapProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/XaeroMapProtocol.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/XaeroMapProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/XaeroMapProtocol.java new file mode 100644 -index 0000000000000000000000000000000000000000..092a91d94aa325dc89f6a84eb885879b70ddc5d3 +index 0000000000000000000000000000000000000000..9e35dfaf8bb5511b4cd0a71175d7ecb6d835042f --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/XaeroMapProtocol.java ++++ b/src/main/java/org/leavesmc/leaves/protocol/XaeroMapProtocol.java @@ -0,0 +1,41 @@ -+package top.leavesmc.leaves.protocol; ++package org.leavesmc.leaves.protocol; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; -+import top.leavesmc.leaves.protocol.core.LeavesProtocol; -+import top.leavesmc.leaves.protocol.core.ProtocolUtils; ++import org.leavesmc.leaves.protocol.core.LeavesProtocol; ++import org.leavesmc.leaves.protocol.core.ProtocolUtils; + +@LeavesProtocol(namespace = {"xaerominimap", "xaeroworldmap"}) +public class XaeroMapProtocol { diff --git a/patches/unapplied/server/0067-Chat-Image-protocol.patch b/patches/server/0034-Chat-Image-protocol.patch similarity index 81% rename from patches/unapplied/server/0067-Chat-Image-protocol.patch rename to patches/server/0034-Chat-Image-protocol.patch index 54c523c8..9ee31776 100644 --- a/patches/unapplied/server/0067-Chat-Image-protocol.patch +++ b/patches/server/0034-Chat-Image-protocol.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Chat Image protocol This patch is Powered by ChatImage (https://github.com/kitUIN/ChatImage) diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index 3e5e27efac1791cce961ec144405d8215ab87996..1c1abbb3a74a519520d2c1229721887c19d9df2e 100644 +index be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709..759b8728f954c2b2725ac2b3f5ffeb495160c7ca 100644 --- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -@@ -25,6 +25,9 @@ public class ProtocolSupport implements IConfigModule { +@@ -21,6 +21,9 @@ public class ProtocolSupport implements IConfigModule { @ConfigInfo(baseName = "appleskin-protocol") public static boolean appleskinProtocol = false; @@ -19,13 +19,13 @@ index 3e5e27efac1791cce961ec144405d8215ab87996..1c1abbb3a74a519520d2c1229721887c @ConfigInfo(baseName = "xaero-map-protocol") public static boolean xaeroMapProtocol = false; @ConfigInfo(baseName = "xaero-map-server-id") -diff --git a/src/main/java/top/leavesmc/leaves/protocol/ChatImageProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/ChatImageProtocol.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/ChatImageProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/ChatImageProtocol.java new file mode 100644 -index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dffc5dd40d1 +index 0000000000000000000000000000000000000000..cfbcc4fd836547e6019bc1bc0ac7a3263f0c385a --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/ChatImageProtocol.java -@@ -0,0 +1,149 @@ -+package top.leavesmc.leaves.protocol; ++++ b/src/main/java/org/leavesmc/leaves/protocol/ChatImageProtocol.java +@@ -0,0 +1,157 @@ ++package org.leavesmc.leaves.protocol; + +import com.google.common.collect.Lists; +import com.google.gson.Gson; @@ -37,9 +37,11 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff +import org.dreeam.leaf.config.modules.network.ProtocolSupport; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; -+import top.leavesmc.leaves.protocol.chatimage.ChatImageIndex; -+import top.leavesmc.leaves.protocol.core.LeavesProtocol; -+import top.leavesmc.leaves.protocol.core.ProtocolHandler; ++import org.leavesmc.leaves.protocol.chatimage.ChatImageIndex; ++import org.leavesmc.leaves.protocol.core.LeavesCustomPayload; ++import org.leavesmc.leaves.protocol.core.LeavesProtocol; ++import org.leavesmc.leaves.protocol.core.LeavesProtocolManager; ++import org.leavesmc.leaves.protocol.core.ProtocolHandler; + +import java.util.HashMap; +import java.util.List; @@ -55,10 +57,10 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff + public static int MAX_STRING = 532767; + private static final Gson gson = new Gson(); + -+ public record FileInfoChannelPacket(String message) implements CustomPacketPayload { ++ public record FileInfoChannelPacket(String message) implements LeavesCustomPayload { + private static final ResourceLocation FILE_INFO = ChatImageProtocol.id("file_info"); + -+ public FileInfoChannelPacket(ResourceLocation id,FriendlyByteBuf buffer) { ++ public FileInfoChannelPacket(ResourceLocation id, FriendlyByteBuf buffer) { + this(buffer.readUtf(MAX_STRING)); + } + @@ -73,18 +75,19 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff + } + } + -+ public record DownloadFileChannelPacket(String message) implements CustomPacketPayload { ++ public record DownloadFileChannelPacket(String message) implements LeavesCustomPayload { + /** + * 发送文件分块到客户端通道(Map) + */ + private static final ResourceLocation DOWNLOAD_FILE_CHANNEL = ChatImageProtocol.id("download_file_channel"); + -+ public DownloadFileChannelPacket(ResourceLocation id,FriendlyByteBuf buffer) { ++ public DownloadFileChannelPacket(ResourceLocation id, FriendlyByteBuf buffer) { + this(buffer.readUtf(MAX_STRING)); + } ++ + @Override + public void write(final FriendlyByteBuf buffer) { -+ buffer.writeUtf(message(),MAX_STRING); ++ buffer.writeUtf(message(), MAX_STRING); + } + + @Override @@ -93,14 +96,17 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff + } + + } -+ public record FileChannelPacket(String message) implements CustomPacketPayload { ++ ++ public record FileChannelPacket(String message) implements LeavesCustomPayload { + /** + * 客户端发送文件分块到服务器通道(Map) + */ -+ private static final ResourceLocation FILE_CHANNEL = ChatImageProtocol.id( "file_channel"); -+ public FileChannelPacket(ResourceLocation id,FriendlyByteBuf buffer) { -+ this(buffer.readUtf(MAX_STRING)) ; ++ private static final ResourceLocation FILE_CHANNEL = ChatImageProtocol.id("file_channel"); ++ ++ public FileChannelPacket(ResourceLocation id, FriendlyByteBuf buffer) { ++ this(buffer.readUtf(MAX_STRING)); + } ++ + @Override + public void write(final FriendlyByteBuf buffer) { + buffer.writeUtf(message(), MAX_STRING); @@ -112,6 +118,7 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff + } + + } ++ + @ProtocolHandler.PayloadReceiver(payload = FileChannelPacket.class, payloadId = "file_channel") + public static void serverFileChannelReceived(ServerPlayer player, String res) { + if (!ProtocolSupport.chatImageProtocol) return; @@ -137,6 +144,7 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff + //System.out.println("[FileChannel->Server]" + title.url); + } + } ++ + @ProtocolHandler.PayloadReceiver(payload = FileInfoChannelPacket.class, payloadId = "file_info") + public static void serverFileInfoChannelReceived(ServerPlayer player, String url) { + if (!ProtocolSupport.chatImageProtocol) return; @@ -174,19 +182,21 @@ index 0000000000000000000000000000000000000000..4ee75d7ed8ffda621102c11cb3294dff + } + +} -diff --git a/src/main/java/top/leavesmc/leaves/protocol/chatimage/ChatImageIndex.java b/src/main/java/top/leavesmc/leaves/protocol/chatimage/ChatImageIndex.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/chatimage/ChatImageIndex.java b/src/main/java/org/leavesmc/leaves/protocol/chatimage/ChatImageIndex.java new file mode 100644 -index 0000000000000000000000000000000000000000..bd4f2f605590653d0da61dc64d62420bda06ceee +index 0000000000000000000000000000000000000000..369917ae4b82b6c1d480a5ac5ebd00e0c55f1fb5 --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/chatimage/ChatImageIndex.java -@@ -0,0 +1,13 @@ -+package top.leavesmc.leaves.protocol.chatimage; ++++ b/src/main/java/org/leavesmc/leaves/protocol/chatimage/ChatImageIndex.java +@@ -0,0 +1,15 @@ ++package org.leavesmc.leaves.protocol.chatimage; ++ +public class ChatImageIndex { + public int index; + public int total; + public String url; + public String bytes; -+ public ChatImageIndex(int index, int total, String url, String bytes){ ++ ++ public ChatImageIndex(int index, int total, String url, String bytes) { + this.index = index; + this.total = total; + this.url = url; diff --git a/patches/unapplied/server/0068-Asteor-Bar-protocol.patch b/patches/server/0035-Asteor-Bar-protocol.patch similarity index 85% rename from patches/unapplied/server/0068-Asteor-Bar-protocol.patch rename to patches/server/0035-Asteor-Bar-protocol.patch index b691a401..fae0dbea 100644 --- a/patches/unapplied/server/0068-Asteor-Bar-protocol.patch +++ b/patches/server/0035-Asteor-Bar-protocol.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Asteor Bar protocol This patch is Powered by AsteorBar (https://github.com/afoxxvi/AsteorBarMod) diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index 1c1abbb3a74a519520d2c1229721887c19d9df2e..92bac2a84fef7b91f033479f2362ce7a2009a51a 100644 +index 759b8728f954c2b2725ac2b3f5ffeb495160c7ca..8378bab717088b832888be69618f13ba6dd44273 100644 --- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -@@ -25,6 +25,9 @@ public class ProtocolSupport implements IConfigModule { +@@ -21,6 +21,9 @@ public class ProtocolSupport implements IConfigModule { @ConfigInfo(baseName = "appleskin-protocol") public static boolean appleskinProtocol = false; @@ -19,13 +19,13 @@ index 1c1abbb3a74a519520d2c1229721887c19d9df2e..92bac2a84fef7b91f033479f2362ce7a @ConfigInfo(baseName = "chatImage-protocol") public static boolean chatImageProtocol = false; -diff --git a/src/main/java/top/leavesmc/leaves/protocol/AsteorBarProtocol.java b/src/main/java/top/leavesmc/leaves/protocol/AsteorBarProtocol.java +diff --git a/src/main/java/org/leavesmc/leaves/protocol/AsteorBarProtocol.java b/src/main/java/org/leavesmc/leaves/protocol/AsteorBarProtocol.java new file mode 100644 -index 0000000000000000000000000000000000000000..9651c6c83d17b42edd81070890bd81dcb887f898 +index 0000000000000000000000000000000000000000..f2a9cc78796587862dd4ec57e377e1788497071d --- /dev/null -+++ b/src/main/java/top/leavesmc/leaves/protocol/AsteorBarProtocol.java -@@ -0,0 +1,102 @@ -+package top.leavesmc.leaves.protocol; ++++ b/src/main/java/org/leavesmc/leaves/protocol/AsteorBarProtocol.java +@@ -0,0 +1,106 @@ ++package org.leavesmc.leaves.protocol; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.MinecraftServer; @@ -33,11 +33,15 @@ index 0000000000000000000000000000000000000000..9651c6c83d17b42edd81070890bd81dc +import net.minecraft.world.food.FoodData; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; -+import top.leavesmc.leaves.protocol.core.LeavesProtocol; -+import top.leavesmc.leaves.protocol.core.ProtocolHandler; -+import top.leavesmc.leaves.protocol.core.ProtocolUtils; ++import org.leavesmc.leaves.protocol.core.LeavesProtocol; ++import org.leavesmc.leaves.protocol.core.ProtocolHandler; ++import org.leavesmc.leaves.protocol.core.ProtocolUtils; + -+import java.util.*; ++import java.util.HashMap; ++import java.util.HashSet; ++import java.util.Map; ++import java.util.Set; ++import java.util.UUID; + +@LeavesProtocol(namespace = "asteorbar") +public class AsteorBarProtocol { diff --git a/patches/server/0030-Leaves-Disable-moved-wrongly-threshold.patch b/patches/server/0036-Leaves-Disable-moved-wrongly-threshold.patch similarity index 97% rename from patches/server/0030-Leaves-Disable-moved-wrongly-threshold.patch rename to patches/server/0036-Leaves-Disable-moved-wrongly-threshold.patch index f8dcca90..b9f56177 100644 --- a/patches/server/0030-Leaves-Disable-moved-wrongly-threshold.patch +++ b/patches/server/0036-Leaves-Disable-moved-wrongly-threshold.patch @@ -6,8 +6,10 @@ Subject: [PATCH] Leaves: Disable moved wrongly threshold Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves +Commit: 87bfa2d2bbc597c8351ec8776b14c5a6166ed01c + diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 479fe0a14736a2eec61a7d50b7afbacc548c06e2..1acac1e6288e67db00599f98fbdf8ba12702c11a 100644 +index d107cd93a6d43f060a7bcfc4a3ee0c82c51bc9b9..cc9c30b8555e0509162a82c4a01de9fc51ba59af 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -589,7 +589,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0031-Leaves-Fix-vehicle-teleport-by-end-gateway.patch b/patches/server/0037-Leaves-Fix-vehicle-teleport-by-end-gateway.patch similarity index 98% rename from patches/server/0031-Leaves-Fix-vehicle-teleport-by-end-gateway.patch rename to patches/server/0037-Leaves-Fix-vehicle-teleport-by-end-gateway.patch index e6b0c926..b5b85f48 100644 --- a/patches/server/0031-Leaves-Fix-vehicle-teleport-by-end-gateway.patch +++ b/patches/server/0037-Leaves-Fix-vehicle-teleport-by-end-gateway.patch @@ -6,6 +6,8 @@ Subject: [PATCH] Leaves: Fix vehicle teleport by end gateway Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves +Commit: 87bfa2d2bbc597c8351ec8776b14c5a6166ed01c + diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java index 0e58011d22536051a18388c2d45fd1a30c2f5ffd..2910af920a746f90529f94038922e2a9e6ad3bc1 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java diff --git a/patches/unapplied/server/0044-Faster-Random-for-xaeroMapServerID-generation.patch b/patches/server/0038-Faster-Random-for-xaeroMapServerID-generation.patch similarity index 77% rename from patches/unapplied/server/0044-Faster-Random-for-xaeroMapServerID-generation.patch rename to patches/server/0038-Faster-Random-for-xaeroMapServerID-generation.patch index e7b24c42..5c78d74d 100644 --- a/patches/unapplied/server/0044-Faster-Random-for-xaeroMapServerID-generation.patch +++ b/patches/server/0038-Faster-Random-for-xaeroMapServerID-generation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Faster Random for xaeroMapServerID generation diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -index 87b5571a5ebd11ea6e64565038b1fac331cfba8e..3e5e27efac1791cce961ec144405d8215ab87996 100644 +index 8378bab717088b832888be69618f13ba6dd44273..58c2745563b482e9147afa168de72c3ee7a79f0b 100644 --- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java +++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java -@@ -5,7 +5,7 @@ import org.dreeam.leaf.config.ConfigInfo; +@@ -4,7 +4,7 @@ import org.dreeam.leaf.config.ConfigInfo; import org.dreeam.leaf.config.EnumConfigCategory; import org.dreeam.leaf.config.IConfigModule; @@ -17,12 +17,10 @@ index 87b5571a5ebd11ea6e64565038b1fac331cfba8e..3e5e27efac1791cce961ec144405d821 public class ProtocolSupport implements IConfigModule { -@@ -28,7 +28,7 @@ public class ProtocolSupport implements IConfigModule { +@@ -30,5 +30,5 @@ public class ProtocolSupport implements IConfigModule { @ConfigInfo(baseName = "xaero-map-protocol") public static boolean xaeroMapProtocol = false; @ConfigInfo(baseName = "xaero-map-server-id") - public static int xaeroMapServerID = new Random().nextInt(); + public static int xaeroMapServerID = ThreadLocalRandom.current().nextInt(); // Leaf - Faster Random - - @ConfigInfo(baseName = "syncmatica-enabled") - public static boolean syncmaticaProtocol = false; + } diff --git a/patches/server/0032-Petal-Async-Pathfinding.patch b/patches/server/0039-Petal-Async-Pathfinding.patch similarity index 100% rename from patches/server/0032-Petal-Async-Pathfinding.patch rename to patches/server/0039-Petal-Async-Pathfinding.patch diff --git a/patches/server/0033-Petal-Multithreaded-Tracker.patch b/patches/server/0040-Petal-Multithreaded-Tracker.patch similarity index 100% rename from patches/server/0033-Petal-Multithreaded-Tracker.patch rename to patches/server/0040-Petal-Multithreaded-Tracker.patch diff --git a/patches/server/0034-Petal-reduce-work-done-by-game-event-system.patch b/patches/server/0041-Petal-reduce-work-done-by-game-event-system.patch similarity index 100% rename from patches/server/0034-Petal-reduce-work-done-by-game-event-system.patch rename to patches/server/0041-Petal-reduce-work-done-by-game-event-system.patch diff --git a/patches/server/0035-Fix-tracker-NPE.patch b/patches/server/0042-Fix-tracker-NPE.patch similarity index 97% rename from patches/server/0035-Fix-tracker-NPE.patch rename to patches/server/0042-Fix-tracker-NPE.patch index d3b9b95b..99969663 100644 --- a/patches/server/0035-Fix-tracker-NPE.patch +++ b/patches/server/0042-Fix-tracker-NPE.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix tracker NPE diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index da9b182bb8d7d4457a66ecbc2adb289956780693..3852985ebf9643f6b1b17a3d090175800bcdd079 100644 +index 822604900ccfe18d8e73c746af2d3d0fc36a2734..5e95d84c37d2d36d62a0b5b3f55bf28bd40bf7ee 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -244,7 +244,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0036-Optimize-Minecart-collisions.patch b/patches/server/0043-Optimize-Minecart-collisions.patch similarity index 100% rename from patches/server/0036-Optimize-Minecart-collisions.patch rename to patches/server/0043-Optimize-Minecart-collisions.patch diff --git a/patches/server/0037-Reduce-canSee-work.patch b/patches/server/0044-Reduce-canSee-work.patch similarity index 96% rename from patches/server/0037-Reduce-canSee-work.patch rename to patches/server/0044-Reduce-canSee-work.patch index a6f6accb..10413a62 100644 --- a/patches/server/0037-Reduce-canSee-work.patch +++ b/patches/server/0044-Reduce-canSee-work.patch @@ -36,7 +36,7 @@ index a3adc109213885a193f7131405bd4a2f6a90f9be..e971ef13754402f3de118ea24cb9f83b if (net.minecraft.world.phys.shapes.Shapes.joinIsNotEmpty(voxelshape, net.minecraft.world.phys.shapes.Shapes.create(entity.getBoundingBox()), net.minecraft.world.phys.shapes.BooleanOp.AND)) { return false; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 507faaf2578d49c900ed8a3d9ab995695d47142d..d2e869d35bfb12fe2e0fe1c4e144446883166dd3 100644 +index bbbac669bcadd596ad40a0eed99e2587db9c900e..bbc8135343b8206c5348eab802a257555b16836f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -636,6 +636,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0038-Faster-Natural-Spawning.patch b/patches/server/0045-Faster-Natural-Spawning.patch similarity index 100% rename from patches/server/0038-Faster-Natural-Spawning.patch rename to patches/server/0045-Faster-Natural-Spawning.patch diff --git a/patches/server/0039-Fix-sprint-glitch.patch b/patches/server/0046-Fix-sprint-glitch.patch similarity index 90% rename from patches/server/0039-Fix-sprint-glitch.patch rename to patches/server/0046-Fix-sprint-glitch.patch index d3ce5b29..d74717a3 100644 --- a/patches/server/0039-Fix-sprint-glitch.patch +++ b/patches/server/0046-Fix-sprint-glitch.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix sprint glitch diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c0eab84d85bdcd01058d3fa4871eb09e10b6171a..20954a7ae2ea649fe176787ec82320f3e946d752 100644 +index d55d869f0a389d58d001e59e26b1b5912b5c94a8..919b71af99edfed2240bacfd288fcd210398f49a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1451,7 +1451,8 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0040-Fix-keepalive-kicked-name.patch b/patches/server/0047-Fix-keepalive-kicked-name.patch similarity index 89% rename from patches/server/0040-Fix-keepalive-kicked-name.patch rename to patches/server/0047-Fix-keepalive-kicked-name.patch index fcd61479..e727053b 100644 --- a/patches/server/0040-Fix-keepalive-kicked-name.patch +++ b/patches/server/0047-Fix-keepalive-kicked-name.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix keepalive kicked name diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 5972362c1c968dbabb799824227c6ae3aef0b61e..f74f1411384945498823fbdcf9d2e0ce4fc3e8ae 100644 +index 9fa1cb2146bb8173a246981c0f73cd8c1bc44abe..487e24f1a26428cdaee3ca946ac8f5f1f599b260 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -282,7 +282,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -288,7 +288,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack if (GaleGlobalConfiguration.get().misc.keepalive.sendMultiple) { if (elapsedTime >= 1000L) { // 1 second if (!this.processedDisconnect && this.keepAlives.size() >= KEEPALIVE_LIMIT_IN_SECONDS) { diff --git a/patches/server/0041-Configurable-movement-speed-of-more-entities.patch b/patches/server/0048-Configurable-movement-speed-of-more-entities.patch similarity index 99% rename from patches/server/0041-Configurable-movement-speed-of-more-entities.patch rename to patches/server/0048-Configurable-movement-speed-of-more-entities.patch index 3c8a038e..2a0a199c 100644 --- a/patches/server/0041-Configurable-movement-speed-of-more-entities.patch +++ b/patches/server/0048-Configurable-movement-speed-of-more-entities.patch @@ -97,7 +97,7 @@ index 5bae3215ee0bf222c3bd77b3131f3d01ac6c9c41..8a643108954698425413d14eb9a2c86c @Override public EntityDimensions getDefaultDimensions(Pose pose) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 4a385c42da7ab3be46d5e47d00daee5e0b6da88f..7a3017177f68111c0de9b197b0bf8e4159fd561d 100644 +index 2c5d79dfddcab0410a6d1556658992f027a9a401..954e620384d170c535751d0ae7f982c6face04f4 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -1530,6 +1530,7 @@ public class PurpurWorldConfig { diff --git a/patches/server/0042-Faster-sequencing-of-futures-for-chunk-structure-gen.patch b/patches/server/0049-Faster-sequencing-of-futures-for-chunk-structure-gen.patch similarity index 100% rename from patches/server/0042-Faster-sequencing-of-futures-for-chunk-structure-gen.patch rename to patches/server/0049-Faster-sequencing-of-futures-for-chunk-structure-gen.patch diff --git a/patches/server/0043-Reduce-items-finding-hopper-nearby-check.patch b/patches/server/0050-Reduce-items-finding-hopper-nearby-check.patch similarity index 100% rename from patches/server/0043-Reduce-items-finding-hopper-nearby-check.patch rename to patches/server/0050-Reduce-items-finding-hopper-nearby-check.patch diff --git a/patches/server/0044-Plazma-Add-some-missing-Pufferfish-configurations.patch b/patches/server/0051-Plazma-Add-some-missing-Pufferfish-configurations.patch similarity index 100% rename from patches/server/0044-Plazma-Add-some-missing-Pufferfish-configurations.patch rename to patches/server/0051-Plazma-Add-some-missing-Pufferfish-configurations.patch diff --git a/patches/server/0045-Plazma-Add-missing-purpur-configuration-options.patch b/patches/server/0052-Plazma-Add-missing-purpur-configuration-options.patch similarity index 99% rename from patches/server/0045-Plazma-Add-missing-purpur-configuration-options.patch rename to patches/server/0052-Plazma-Add-missing-purpur-configuration-options.patch index 257d3a1d..c6295bd7 100644 --- a/patches/server/0045-Plazma-Add-missing-purpur-configuration-options.patch +++ b/patches/server/0052-Plazma-Add-missing-purpur-configuration-options.patch @@ -216,7 +216,7 @@ index b04f7ce0805453f6c737fa9dc11c4129ca64e934..7ee2e841b364928620f36bd65b39aab3 @Override diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 8facd29bac314d4b8897113460f78ea7ed3e82b6..300d5144d828330e3de934b1026a0f1b96496d79 100644 +index eaa8b63b0fb1f0ebefba9014cfec7f1065332171..276e605eae9034a19a382c36df04fcef8b7e3d9f 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -323,6 +323,7 @@ public class PurpurConfig { @@ -236,7 +236,7 @@ index 8facd29bac314d4b8897113460f78ea7ed3e82b6..300d5144d828330e3de934b1026a0f1b org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 7a3017177f68111c0de9b197b0bf8e4159fd561d..fb7bead916b9ed069b3a3351625393958da5cd83 100644 +index 954e620384d170c535751d0ae7f982c6face04f4..b949b24be61f7ff9387b4c4aa8d2f033e7daa300 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java @@ -1170,10 +1170,20 @@ public class PurpurWorldConfig { diff --git a/patches/server/0046-Skip-event-if-no-listeners.patch b/patches/server/0053-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0046-Skip-event-if-no-listeners.patch rename to patches/server/0053-Skip-event-if-no-listeners.patch diff --git a/patches/server/0047-PaperPR-Rewrite-framed-map-tracker-ticking.patch b/patches/server/0054-PaperPR-Rewrite-framed-map-tracker-ticking.patch similarity index 100% rename from patches/server/0047-PaperPR-Rewrite-framed-map-tracker-ticking.patch rename to patches/server/0054-PaperPR-Rewrite-framed-map-tracker-ticking.patch diff --git a/patches/server/0048-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch b/patches/server/0055-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch similarity index 100% rename from patches/server/0048-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch rename to patches/server/0055-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch diff --git a/patches/server/0049-SparklyPaper-Cache-coordinate-key-used-for-nearby-pl.patch b/patches/server/0056-SparklyPaper-Cache-coordinate-key-used-for-nearby-pl.patch similarity index 100% rename from patches/server/0049-SparklyPaper-Cache-coordinate-key-used-for-nearby-pl.patch rename to patches/server/0056-SparklyPaper-Cache-coordinate-key-used-for-nearby-pl.patch diff --git a/patches/server/0050-SparklyPaper-Optimize-canSee-checks.patch b/patches/server/0057-SparklyPaper-Optimize-canSee-checks.patch similarity index 100% rename from patches/server/0050-SparklyPaper-Optimize-canSee-checks.patch rename to patches/server/0057-SparklyPaper-Optimize-canSee-checks.patch diff --git a/patches/server/0051-Polpot-Make-egg-and-snowball-can-knockback-player.patch b/patches/server/0058-Polpot-Make-egg-and-snowball-can-knockback-player.patch similarity index 100% rename from patches/server/0051-Polpot-Make-egg-and-snowball-can-knockback-player.patch rename to patches/server/0058-Polpot-Make-egg-and-snowball-can-knockback-player.patch diff --git a/patches/server/0052-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch b/patches/server/0059-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch similarity index 100% rename from patches/server/0052-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch rename to patches/server/0059-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch diff --git a/patches/server/0053-Fix-MC-2025.patch b/patches/server/0060-Fix-MC-2025.patch similarity index 95% rename from patches/server/0053-Fix-MC-2025.patch rename to patches/server/0060-Fix-MC-2025.patch index 26b035f1..cd3161be 100644 --- a/patches/server/0053-Fix-MC-2025.patch +++ b/patches/server/0060-Fix-MC-2025.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix MC-2025 Mojang issues: https://bugs.mojang.com/browse/MC-2025 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 8b314a1ad2bf833cee950471d63e5538192bb1ab..c0089483f2085b60fa34884885fa83915d5fc143 100644 +index 638709c6393cb7f3ca4e3328b50ae8c0294953e1..386fd36c56787966537df63337534c039e6858d0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2629,6 +2629,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0054-Fix-MC-65198.patch b/patches/server/0061-Fix-MC-65198.patch similarity index 100% rename from patches/server/0054-Fix-MC-65198.patch rename to patches/server/0061-Fix-MC-65198.patch diff --git a/patches/server/0055-Including-5s-in-getTPS.patch b/patches/server/0062-Including-5s-in-getTPS.patch similarity index 92% rename from patches/server/0055-Including-5s-in-getTPS.patch rename to patches/server/0062-Including-5s-in-getTPS.patch index b23d133c..80220b89 100644 --- a/patches/server/0055-Including-5s-in-getTPS.patch +++ b/patches/server/0062-Including-5s-in-getTPS.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Including 5s in getTPS() diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index aa588fe83d508e1888ce9fb1c9fa9c1fe54d4cef..8d282abbf968ddab0f660a29b2a37bf7d569c481 100644 +index e9475b7761af84b97f522698a304f0b1ccc134a2..b56ba8d477a86dc983a2170f99fa29bb7472a081 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -3156,6 +3156,8 @@ public final class CraftServer implements Server { +@@ -3158,6 +3158,8 @@ public final class CraftServer implements Server { @Override public double[] getTPS() { diff --git a/patches/server/0056-Remove-useless-creating-stats-json-bases-on-player-n.patch b/patches/server/0063-Remove-useless-creating-stats-json-bases-on-player-n.patch similarity index 86% rename from patches/server/0056-Remove-useless-creating-stats-json-bases-on-player-n.patch rename to patches/server/0063-Remove-useless-creating-stats-json-bases-on-player-n.patch index d690df70..0c507ead 100644 --- a/patches/server/0056-Remove-useless-creating-stats-json-bases-on-player-n.patch +++ b/patches/server/0063-Remove-useless-creating-stats-json-bases-on-player-n.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove useless creating stats json bases on player name logic diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 07b9f53d49d9ba8bbd3fa3da99bb7cd05510a00c..c0d8094d26e1edf3ccee789158cba2e3a2fb8fca 100644 +index c410f781371a87ecc2849144c747a6ac3182a65a..b87fa81ccee6792b3a202b2c193299dbd2cce112 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1576,6 +1576,8 @@ public abstract class PlayerList { +@@ -1580,6 +1580,8 @@ public abstract class PlayerList { File file = this.server.getWorldPath(LevelResource.PLAYER_STATS_DIR).toFile(); File file1 = new File(file, String.valueOf(uuid) + ".json"); @@ -17,7 +17,7 @@ index 07b9f53d49d9ba8bbd3fa3da99bb7cd05510a00c..c0d8094d26e1edf3ccee789158cba2e3 if (!file1.exists()) { File file2 = new File(file, displayName + ".json"); // CraftBukkit Path path = file2.toPath(); -@@ -1584,6 +1586,8 @@ public abstract class PlayerList { +@@ -1588,6 +1590,8 @@ public abstract class PlayerList { file2.renameTo(file1); } } diff --git a/patches/server/0057-Fix-NPE-during-creating-GUI-graph.patch b/patches/server/0064-Fix-NPE-during-creating-GUI-graph.patch similarity index 100% rename from patches/server/0057-Fix-NPE-during-creating-GUI-graph.patch rename to patches/server/0064-Fix-NPE-during-creating-GUI-graph.patch diff --git a/patches/server/0058-Don-t-throw-exception-on-missing-ResourceKey-value.patch b/patches/server/0065-Don-t-throw-exception-on-missing-ResourceKey-value.patch similarity index 100% rename from patches/server/0058-Don-t-throw-exception-on-missing-ResourceKey-value.patch rename to patches/server/0065-Don-t-throw-exception-on-missing-ResourceKey-value.patch diff --git a/patches/server/0059-Improve-Purpur-AFK-system.patch b/patches/server/0066-Improve-Purpur-AFK-system.patch similarity index 100% rename from patches/server/0059-Improve-Purpur-AFK-system.patch rename to patches/server/0066-Improve-Purpur-AFK-system.patch diff --git a/patches/server/0060-Virtual-Thread-for-async-scheduler.patch b/patches/server/0067-Virtual-Thread-for-async-scheduler.patch similarity index 100% rename from patches/server/0060-Virtual-Thread-for-async-scheduler.patch rename to patches/server/0067-Virtual-Thread-for-async-scheduler.patch diff --git a/patches/server/0061-Mirai-Configurable-chat-message-signatures.patch b/patches/server/0068-Mirai-Configurable-chat-message-signatures.patch similarity index 96% rename from patches/server/0061-Mirai-Configurable-chat-message-signatures.patch rename to patches/server/0068-Mirai-Configurable-chat-message-signatures.patch index 53b90c93..4663c7a2 100644 --- a/patches/server/0061-Mirai-Configurable-chat-message-signatures.patch +++ b/patches/server/0068-Mirai-Configurable-chat-message-signatures.patch @@ -83,10 +83,10 @@ index ee99b0e74abc6447937b1af627c10ffbeeb9e0c0..18554ce89a6de5dc6a8116e27f7210c0 // Paper start - Add setting for proxy online mode status diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 4ff90467343ab5f9e6f40d77a7399456626cabda..97091e594b77c7d65c4b3fffad8f483d9bf1a2f7 100644 +index 487e24f1a26428cdaee3ca946ac8f5f1f599b260..46120f0771dcd52af1a93ab67f00572921c834e7 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -329,10 +329,29 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -335,10 +335,29 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } public void send(Packet packet) { @@ -117,10 +117,10 @@ index 4ff90467343ab5f9e6f40d77a7399456626cabda..97091e594b77c7d65c4b3fffad8f483d if (packet == null || this.processedDisconnect) { // Spigot return; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c0d8094d26e1edf3ccee789158cba2e3a2fb8fca..16dba0fe00150ea919deff052b5dc7a2732741c1 100644 +index b87fa81ccee6792b3a202b2c193299dbd2cce112..88633fce3052621358a82f18340be620690cdca6 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1529,7 +1529,7 @@ public abstract class PlayerList { +@@ -1533,7 +1533,7 @@ public abstract class PlayerList { // Paper end boolean flag = this.verifyChatTrusted(message); @@ -129,7 +129,7 @@ index c0d8094d26e1edf3ccee789158cba2e3a2fb8fca..16dba0fe00150ea919deff052b5dc7a2 OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message); boolean flag1 = false; -@@ -1558,6 +1558,7 @@ public abstract class PlayerList { +@@ -1562,6 +1562,7 @@ public abstract class PlayerList { } public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public diff --git a/patches/server/0062-Block-log4j-rce-exploit-in-chat.patch b/patches/server/0069-Block-log4j-rce-exploit-in-chat.patch similarity index 93% rename from patches/server/0062-Block-log4j-rce-exploit-in-chat.patch rename to patches/server/0069-Block-log4j-rce-exploit-in-chat.patch index 0ac3ed49..a9ccc4e5 100644 --- a/patches/server/0062-Block-log4j-rce-exploit-in-chat.patch +++ b/patches/server/0069-Block-log4j-rce-exploit-in-chat.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Block log4j rce exploit in chat diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5fe21ffe8a868184b909e444798701fab52e91c1..b4bab818c53c31bba220996696406a05cb57db8b 100644 +index 7830e21dce33ad389441227d728750606dcd3c56..e49bd9ab6c77ecb9da60d973e97448a2f4c78492 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2444,6 +2444,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -34,7 +34,7 @@ index 5fe21ffe8a868184b909e444798701fab52e91c1..b4bab818c53c31bba220996696406a05 for (int i = 0; i < message.length(); ++i) { if (!StringUtil.isAllowedChatCharacter(message.charAt(i))) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 65105a4fc797c9d7767fa9f837d9cef08f3f46ab..059aebbe2173bfc77071fad0884d92ebe756f848 100644 +index 3bb35f002cecee7b5ffac8f8aedcce2336d662f1..8dd5fb89dbab34562c1bdb6ccced24606e5dc6f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -751,6 +751,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0063-Cache-player-profileResult.patch b/patches/server/0070-Cache-player-profileResult.patch similarity index 100% rename from patches/server/0063-Cache-player-profileResult.patch rename to patches/server/0070-Cache-player-profileResult.patch diff --git a/patches/server/0064-Prevent-change-non-editable-sign-warning-spam-in-con.patch b/patches/server/0071-Prevent-change-non-editable-sign-warning-spam-in-con.patch similarity index 96% rename from patches/server/0064-Prevent-change-non-editable-sign-warning-spam-in-con.patch rename to patches/server/0071-Prevent-change-non-editable-sign-warning-spam-in-con.patch index ba96428e..88ca163d 100644 --- a/patches/server/0064-Prevent-change-non-editable-sign-warning-spam-in-con.patch +++ b/patches/server/0071-Prevent-change-non-editable-sign-warning-spam-in-con.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent change non-editable sign warning spam in console diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index a28be7a332659be655f419d969e0c64e659b6c21..3d3c4a302be6ab681729b44aaa5b68542cd0d117 100644 +index 8cd812a25b1cc05ea14675658bf9c1503ebebd51..94f09eaba8d8fffb18b1f1407baf982763a18f5e 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -189,7 +189,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C diff --git a/patches/server/0065-Matter-Secure-Seed.patch b/patches/server/0072-Matter-Secure-Seed.patch similarity index 99% rename from patches/server/0065-Matter-Secure-Seed.patch rename to patches/server/0072-Matter-Secure-Seed.patch index 37e0329d..d6a4ba48 100644 --- a/patches/server/0065-Matter-Secure-Seed.patch +++ b/patches/server/0072-Matter-Secure-Seed.patch @@ -581,7 +581,7 @@ index 82b4bd669c57b18fb0b443bcd94495023cd5a528..2d336a8bb12e9e41b717caf883d39de1 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8d282abbf968ddab0f660a29b2a37bf7d569c481..3043b7a53269ed17aae3a531f495600d336a376a 100644 +index b56ba8d477a86dc983a2170f99fa29bb7472a081..1d84882a613fd3d602df0eccd27e1b0381aaadd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -266,6 +266,10 @@ import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -595,7 +595,7 @@ index 8d282abbf968ddab0f660a29b2a37bf7d569c481..3043b7a53269ed17aae3a531f495600d public final class CraftServer implements Server { private final String serverName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper private final String serverVersion; -@@ -1360,7 +1364,7 @@ public final class CraftServer implements Server { +@@ -1362,7 +1366,7 @@ public final class CraftServer implements Server { iregistrycustom_dimension = leveldataanddimensions.dimensions().dimensionsRegistryAccess(); } else { LevelSettings worldsettings; diff --git a/patches/server/0066-Matter-Seed-Command.patch b/patches/server/0073-Matter-Seed-Command.patch similarity index 100% rename from patches/server/0066-Matter-Seed-Command.patch rename to patches/server/0073-Matter-Seed-Command.patch diff --git a/patches/server/0067-Ignore-terminal-provider-warning.patch b/patches/server/0074-Ignore-terminal-provider-warning.patch similarity index 100% rename from patches/server/0067-Ignore-terminal-provider-warning.patch rename to patches/server/0074-Ignore-terminal-provider-warning.patch diff --git a/patches/server/0068-Fix-console-freeze-above-JAVA-22.patch b/patches/server/0075-Fix-console-freeze-above-JAVA-22.patch similarity index 100% rename from patches/server/0068-Fix-console-freeze-above-JAVA-22.patch rename to patches/server/0075-Fix-console-freeze-above-JAVA-22.patch diff --git a/patches/server/0069-Faster-Random-Generator.patch b/patches/server/0076-Faster-Random-Generator.patch similarity index 100% rename from patches/server/0069-Faster-Random-Generator.patch rename to patches/server/0076-Faster-Random-Generator.patch diff --git a/patches/server/0070-Skip-null-banner-pattern.patch b/patches/server/0077-Skip-null-banner-pattern.patch similarity index 100% rename from patches/server/0070-Skip-null-banner-pattern.patch rename to patches/server/0077-Skip-null-banner-pattern.patch diff --git a/patches/unapplied/server/0031-Leaves-Jade-Protocol.patch b/patches/unapplied/server/0091-Leaves-Jade-Protocol.patch similarity index 100% rename from patches/unapplied/server/0031-Leaves-Jade-Protocol.patch rename to patches/unapplied/server/0091-Leaves-Jade-Protocol.patch diff --git a/patches/unapplied/server/0034-Leaves-Syncmatica-Protocol.patch b/patches/unapplied/server/0095-Leaves-Syncmatica-Protocol.patch similarity index 100% rename from patches/unapplied/server/0034-Leaves-Syncmatica-Protocol.patch rename to patches/unapplied/server/0095-Leaves-Syncmatica-Protocol.patch