From 0ddd20c6f7cc545bba5b8345416ee377d5b87be2 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 14 Aug 2022 10:03:13 +0200 Subject: [PATCH] Updated Upstream (CraftBukkit/Spigot) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: ead719a65 SPIGOT-7136: Cancelling PlayerInteractEntityEvent with the Allay desyncs 8468e167e SPIGOT-7137: StructureGrowEvent isFromBonemeal and getPlayer have incorrect values d45057c59 SPIGOT-7089: Crash when command blocks attempt to load worlds Spigot Changes: 450dcaa8 Rebuild patches --- patches/server/0005-MC-Dev-fixes.patch | 4 +- patches/server/0008-Adventure.patch | 36 +++++----- patches/server/0012-Timings-v2.patch | 18 ++--- ...ient-crashes-server-lists-and-Mojang.patch | 6 +- ...47-Ensure-commands-are-not-ran-async.patch | 10 +-- .../0061-Complete-resource-pack-API.patch | 6 +- ...0079-Add-PlayerUseUnknownEntityEvent.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 4 +- ...onfigurable-packet-in-spam-threshold.patch | 4 +- ...05-Configurable-flying-kick-messages.patch | 6 +- ...19-Properly-fix-item-duplication-bug.patch | 4 +- ...le-async-calls-to-restart-the-server.patch | 6 +- ...ke-parrots-stay-on-shoulders-despite.patch | 4 +- ...oleAppender-for-console-improvements.patch | 6 +- patches/server/0156-Add-PlayerJumpEvent.patch | 4 +- ...dle-ServerboundKeepAlivePacket-async.patch | 4 +- ...rt-serverside-behavior-of-keepalives.patch | 8 +-- .../server/0166-AsyncTabCompleteEvent.patch | 6 +- ...-allowed-colored-signs-to-be-created.patch | 4 +- .../0215-InventoryCloseEvent-Reason-API.patch | 10 +-- ...nventory-when-cancelling-PlayerInter.patch | 4 +- ...nd-make-tab-spam-limits-configurable.patch | 8 +-- ...52-Asynchronous-chunk-IO-and-loading.patch | 8 +-- ...event-players-from-moving-into-unloa.patch | 10 +-- ...t-allow-digging-into-unloaded-chunks.patch | 4 +- patches/server/0289-Book-Size-Limits.patch | 4 +- .../0297-Implement-Brigadier-Mojang-API.patch | 6 +- .../0299-Limit-Client-Sign-length-more.patch | 6 +- ...ity-Metadata-for-all-tracked-players.patch | 16 ++--- ...l-to-changed-postToMainThread-method.patch | 4 +- ...isPrimaryThread-and-MinecraftServer-.patch | 6 +- ...31-Dont-send-unnecessary-sign-update.patch | 4 +- ...or-when-player-hand-set-to-empty-typ.patch | 4 +- ...-Add-tick-times-API-and-mspt-command.patch | 6 +- .../0384-Improved-Watchdog-Support.patch | 6 +- ...Load-Chunks-for-Login-Asynchronously.patch | 8 +-- ...PickItem-Packet-and-kick-for-invalid.patch | 4 +- ...07-Prevent-teleporting-dead-entities.patch | 4 +- ...-desync-in-playerconnection-causing-.patch | 4 +- ...implement-PlayerRecipeBookClickEvent.patch | 4 +- ...39-Add-permission-for-command-blocks.patch | 6 +- ...ld-Difficulty-Remembering-Difficulty.patch | 12 ++-- patches/server/0474-Brand-support.patch | 12 ++-- .../0492-Cache-block-data-strings.patch | 4 +- ...ortation-and-cancel-velocity-if-tele.patch | 6 +- ...-non-whitelisted-player-when-white-l.patch | 4 +- ...r-large-move-vectors-crashing-server.patch | 12 ++-- .../server/0521-Add-API-for-quit-reason.patch | 4 +- .../server/0534-Limit-recipe-packets.patch | 8 +-- ...-event-not-being-called-in-adventure.patch | 6 +- ...7-Added-ServerResourcesReloadedEvent.patch | 6 +- patches/server/0568-Add-PaperRegistry.patch | 4 +- ...pport-for-hex-color-codes-in-console.patch | 4 +- ...-using-signs-inside-spawn-protection.patch | 4 +- ...telist-use-configurable-kick-message.patch | 4 +- ...ignore-result-of-PlayerEditBookEvent.patch | 4 +- ...fix-PlayerItemHeldEvent-firing-twice.patch | 4 +- ...d-RespawnFlags-to-PlayerRespawnEvent.patch | 4 +- ...ditions-to-PlayerGameModeChangeEvent.patch | 6 +- ...ove-range-check-for-block-placing-up.patch | 4 +- .../0654-Add-PlayerKickEvent-causes.patch | 68 +++++++++---------- ...nect-for-book-edit-is-called-on-main.patch | 4 +- .../0675-Adds-PlayerArmSwingEvent.patch | 4 +- ...k-event-leave-message-not-being-sent.patch | 10 +-- ...-AFK-kick-while-watching-end-credits.patch | 4 +- .../0735-Execute-chunk-tasks-mid-tick.patch | 6 +- ...-ServerboundCommandSuggestionPacket-.patch | 4 +- ...de-unnecessary-itemmeta-from-clients.patch | 15 ++++ ...on-checking-in-player-move-packet-ha.patch | 20 +++--- .../0832-Kick-on-main-for-illegal-chat.patch | 8 +-- ...o-worldlist-before-initing-the-world.patch | 12 ++-- patches/server/0853-Custom-Potion-Mixes.patch | 6 +- ...cle-movement-from-players-while-tele.patch | 4 +- ...nt-tile-entity-copies-loading-chunks.patch | 4 +- ...s-ServerLevel-for-gamerule-callbacks.patch | 4 +- ...o-not-accept-invalid-client-settings.patch | 4 +- ...n-on-world-create-while-being-ticked.patch | 6 +- ...onent-in-resource-pack-rejection-mes.patch | 4 +- ...-debug-information-to-chat-packet-er.patch | 6 +- ...g-not-using-commands.spam-exclusions.patch | 4 +- patches/server/0919-More-Teleport-API.patch | 6 +- ...ck-entities-after-destroy-prediction.patch | 4 +- ...rocess-cancelling-and-command-changi.patch | 4 +- ...r-to-PlayerConnection-internalTelepo.patch | 4 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 86 files changed, 313 insertions(+), 298 deletions(-) diff --git a/patches/server/0005-MC-Dev-fixes.patch b/patches/server/0005-MC-Dev-fixes.patch index de995ef8a..01ec30b7e 100644 --- a/patches/server/0005-MC-Dev-fixes.patch +++ b/patches/server/0005-MC-Dev-fixes.patch @@ -142,10 +142,10 @@ index 82764c462f82163ee49f4e9466f383366cd23b8b..8da1226a6c293abb038d10c7921a77ed }); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7740e69617c3d543a67ed0942ba8ec550ad4386d..b7d44c4a961ad3881bbf8f87f1595be79e3467f6 100644 +index cd9f94b98f9b7072ed7ca1becd779132dfc1dd12..80a3c56fb5e73c09c542b17aac952fb63081a662 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1737,7 +1737,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -1785,9 +1790,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1788,9 +1793,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic */ this.player.disconnect(); @@ -2129,7 +2129,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f } // CraftBukkit end this.player.getTextFilter().leave(); -@@ -1877,7 +1884,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1880,7 +1887,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.verifyChatMessage(playerchatmessage)) { this.chatMessageChain.append(() -> { CompletableFuture completablefuture = this.filterTextPacket(playerchatmessage.signedContent().plain()); @@ -2138,7 +2138,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f return CompletableFuture.allOf(completablefuture, completablefuture1).thenAcceptAsync((ovoid) -> { FilterMask filtermask = ((FilteredText) completablefuture.join()).mask(); -@@ -2039,7 +2046,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2042,7 +2049,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.handleCommand(s); } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Do nothing, this is coming from a plugin @@ -2152,7 +2152,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f Player player = this.getCraftPlayer(); AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server)); String originalFormat = event.getFormat(), originalMessage = event.getMessage(); -@@ -2172,9 +2184,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2175,9 +2187,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private ChatMessageContent getSignedContent(ServerboundChatPacket packet) { @@ -2167,7 +2167,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f } private void broadcastChatMessage(PlayerChatMessage message) { -@@ -2277,14 +2292,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2280,14 +2295,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private CompletableFuture queryChatPreview(String query) { MutableComponent ichatmutablecomponent = Component.literal(query); @@ -2189,7 +2189,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f } private CompletableFuture queryCommandPreview(String query) { -@@ -2293,7 +2311,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2296,7 +2314,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic CompletableFuture completablefuture = this.getPreviewedArgument(commandlistenerwrapper, PreviewableCommand.of(parseresults)); completablefuture.thenAcceptAsync((ichatbasecomponent) -> { @@ -2198,7 +2198,7 @@ index 047f158fbd267e5ae570ec9bc0a9292a6a894968..b6436801ab2f10c68c8d6c529997223f }, this.server); return completablefuture; } -@@ -3084,30 +3102,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3092,30 +3110,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -2549,7 +2549,7 @@ index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c18 } collection = icons; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5550dbea555a99ee1612609093292db79a625c94..e4f8ccb45a16c35b5256e209435840609d527695 100644 +index 4dd952faac05f553b28d1252296b0587369865f4..6139a06453e370865889f47644a6840fce2934f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -592,8 +592,10 @@ public final class CraftServer implements Server { diff --git a/patches/server/0012-Timings-v2.patch b/patches/server/0012-Timings-v2.patch index 8d0338947..df9edbac2 100644 --- a/patches/server/0012-Timings-v2.patch +++ b/patches/server/0012-Timings-v2.patch @@ -729,7 +729,7 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c } catch (Exception exception) { if (listener.shouldPropagateHandlingExceptions()) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b9a6533afbfe07ff544f9f03f3c254890ee2e068..56fc44274be4592107a89598c7d140b034a18b44 100644 +index e4220f14a5ebf43dd3491fc8649c2be5238c5798..53be6189d3fa6a65a09996683913fbbf5133dcb7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -177,7 +177,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent; @@ -1146,7 +1146,7 @@ index 186a8f5895fedbaf27a7949d9bdbb1a9f2e36fbf..86acdd910eebb8beac4536942119c9e9 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 95c3273d2379509cf6cd51a718f18b8697908932..1d4d60fa861b5e819c59f06168a096688d06e656 100644 +index a60af68365b4cb0e09061e1956d2ae6790659bc0..28669f2e9c4a49322fe44c730b2ed145c9c61273 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1,6 +1,8 @@ @@ -1262,10 +1262,10 @@ index 95c3273d2379509cf6cd51a718f18b8697908932..1d4d60fa861b5e819c59f06168a09668 this.entityManager.saveAll(); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e90946a04b3a 100644 +index a258c965a4a0352f9d77def6748b176f3bdab106..cdc24defe649644ceade1c6cfcfe20c29ca936c1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -339,7 +339,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -342,7 +342,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void tick() { @@ -1273,7 +1273,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909 if (this.ackBlockChangesUpTo > -1) { this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo)); this.ackBlockChangesUpTo = -1; -@@ -420,7 +419,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -423,7 +422,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 this.disconnect(Component.translatable("multiplayer.disconnect.idling")); } @@ -1281,7 +1281,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909 this.chatPreviewThrottler.tick(); } -@@ -2146,7 +2144,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2149,7 +2147,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private void handleCommand(String s) { @@ -1290,7 +1290,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); -@@ -2156,7 +2154,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2159,7 +2157,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getPluginManager().callEvent(event); if (event.isCancelled()) { @@ -1299,7 +1299,7 @@ index b6436801ab2f10c68c8d6c529997223f84735a4e..955902a36c01697999e08a218887e909 return; } -@@ -2169,7 +2167,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2172,7 +2170,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); return; } finally { @@ -1634,7 +1634,7 @@ index 98ba88896c73651591b8ad8e070868fb443ae999..864e2e0355a5fb8c1d4a5b0896ba299f }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 82199864f2046528358af08d4aa4a283fa3e7ffd..5badb27d2060b0b13c54f8945848afbeb775fc6c 100644 +index 295318717fc603b3adc58fbda39bd65e97462b88..eb5c7e15366ee5902d8c754a1e9daec50d26fb17 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2379,12 +2379,31 @@ public final class CraftServer implements Server { diff --git a/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index e3db48a70..15e19a0a9 100644 --- a/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 56fc44274be4592107a89598c7d140b034a18b44..97e2cbd5fa724ba5ba3f33ac1ce3da2e3e881eb8 100644 +index 53be6189d3fa6a65a09996683913fbbf5133dcb7..e6acf596c2c62134e8d2e499d273aa326f792451 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1416,7 +1416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720740d8662 100644 +index cdc24defe649644ceade1c6cfcfe20c29ca936c1..4fe65f979e8c3c15aea2211035745a71aef0feeb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2023,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2026,7 +2026,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return true; } @@ -33,7 +33,7 @@ index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720 for (int i = 0; i < message.length(); ++i) { if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) { return true; -@@ -2040,7 +2040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2043,7 +2043,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } OutgoingPlayerChatMessage outgoing = OutgoingPlayerChatMessage.create(original); @@ -42,7 +42,7 @@ index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720 this.handleCommand(s); } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Do nothing, this is coming from a plugin -@@ -2143,7 +2143,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2146,7 +2146,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -74,7 +74,7 @@ index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index bd17e22c6cb3176da054bce3699c278b2354f193..b61a98f2711c8aeca65e6e782c07ace05c56fbe8 100644 +index 56efe95512c851b965f2295d5eac7bc0c67bdb1f..1c6577bbbc005131661cbb4667cff6494b8fe5e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -863,6 +863,28 @@ public final class CraftServer implements Server { diff --git a/patches/server/0061-Complete-resource-pack-API.patch b/patches/server/0061-Complete-resource-pack-API.patch index a11e070cd..d92f97260 100644 --- a/patches/server/0061-Complete-resource-pack-API.patch +++ b/patches/server/0061-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6ce257fca3a3645fdb68f877279bcae343dbd548..2e9aa7bcdaf86165190d16098d7f6363bfa2f837 100644 +index 4fe65f979e8c3c15aea2211035745a71aef0feeb..bcd95c61ba98604552c3269e974e27b88658f38e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1753,8 +1753,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1756,8 +1756,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect")); } @@ -23,7 +23,7 @@ index 6ce257fca3a3645fdb68f877279bcae343dbd548..2e9aa7bcdaf86165190d16098d7f6363 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3794d05b17378ebf517199adbbfd54a395ef6b37..b85ca8bded5157adad810b9a50ca0fe377597c93 100644 +index d91f69639724aeeb4264f86cf8f76edc22567649..6ae934c6c7c50dd38ff2e762fddfe650e97aa4ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -144,6 +144,7 @@ import org.bukkit.plugin.Plugin; diff --git a/patches/server/0079-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0079-Add-PlayerUseUnknownEntityEvent.patch index c92d3a0d5..63947ccb4 100644 --- a/patches/server/0079-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0079-Add-PlayerUseUnknownEntityEvent.patch @@ -20,10 +20,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510 static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() { @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 405e7a4b959bf288d6740ca6a789af4a137a2d8b..0c2cb67a037c40ac1abef36ce315c56b58370987 100644 +index bcd95c61ba98604552c3269e974e27b88658f38e..33237c6a9f8885abdd5379d17be2b71ad7c2204e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2627,8 +2627,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2635,8 +2635,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic }); } } diff --git a/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch index 071d34ada..d04345309 100644 --- a/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0dffb6e8d6f4edfb4dfaa6b24e81d72356446ebc..b3834c86eb79400c8cef60daa03c90a66b03b688 100644 +index a6c184d450e08737e0053f7526de2ab6e20c454b..c667f8b115ad77ca3d3f908d69915d60d950ffe5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -181,6 +181,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -25,7 +25,7 @@ index 0dffb6e8d6f4edfb4dfaa6b24e81d72356446ebc..b3834c86eb79400c8cef60daa03c90a6 this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.profiler = this.metricsRecorder.getProfiler(); this.onMetricsRecordingStopped = (methodprofilerresults) -> { -@@ -2281,9 +2283,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); @@ -17,7 +17,7 @@ index d3d141d18d9e66bc04e4c1af38b44bdd41e8d416..aea8d2376e88a327985f7f5d34e355cd return; } } else { -@@ -374,7 +374,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -377,7 +377,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); diff --git a/patches/server/0119-Properly-fix-item-duplication-bug.patch b/patches/server/0119-Properly-fix-item-duplication-bug.patch index e783a4a73..6126f06bb 100644 --- a/patches/server/0119-Properly-fix-item-duplication-bug.patch +++ b/patches/server/0119-Properly-fix-item-duplication-bug.patch @@ -19,10 +19,10 @@ index 5b568d8f3f2e8bd466ac1edae9cafc602a226175..69dc4063ae0a3e7271ce0e4ca79c0b05 @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a991d961145c6b86df482dbf029bc8e1d3c9e209..6e041f695f060ca79dcc26d56273afcf79d725f5 100644 +index 952ad96c310b8d1285e1dd07ec224d5005d5c8cc..2b54fe257db874cb74a9bd002de8721d47409e6a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3266,7 +3266,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3274,7 +3274,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public final boolean isDisconnected() { diff --git a/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch index b07682fbd..22e1461d6 100644 --- a/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch +++ b/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,11 +30,11 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f3f528cc7f07da69c45e4290de098c0443c7a952..41928abfffbf6102e92cb45532e691b35a603a31 100644 +index 8c9bc0995f5b59e05a4ecebbe2bfb5d65ec92dcf..81e54058bc5e034b076e2bad1115c53950b3b39b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -221,6 +221,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> levels; + private Map, ServerLevel> levels; private PlayerList playerList; private volatile boolean running; + private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart @@ -64,7 +64,7 @@ index f3f528cc7f07da69c45e4290de098c0443c7a952..41928abfffbf6102e92cb45532e691b3 if (flag) { try { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 23687ae4a06be741a82cec1178d891aed4640084..03a19b3869eea9a59f4003a81ab488603347cd4a 100644 +index aadeb9c63436214d541c563179ed7a32bfdd6d88..dee794f1128309c87d02b1a6a19cf9db314994e3 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1152,8 +1152,15 @@ public abstract class PlayerList { diff --git a/patches/server/0131-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0131-Add-option-to-make-parrots-stay-on-shoulders-despite.patch index fc28a1411..62dc6bafb 100644 --- a/patches/server/0131-Add-option-to-make-parrots-stay-on-shoulders-despite.patch +++ b/patches/server/0131-Add-option-to-make-parrots-stay-on-shoulders-despite.patch @@ -11,10 +11,10 @@ I suspect Mojang may switch to this behavior before full release. To be converted into a Paper-API event at some point in the future? diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6e041f695f060ca79dcc26d56273afcf79d725f5..b3bdff6de8ad38bdb75b19a7dc70888234a39153 100644 +index 2b54fe257db874cb74a9bd002de8721d47409e6a..c06fbadc3960a31b376f814ad050f34954728762 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2452,6 +2452,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2455,6 +2455,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic switch (packet.getAction()) { case PRESS_SHIFT_KEY: this.player.setShiftKeyDown(true); diff --git a/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch index 79a77b4a8..cdb6d9a12 100644 --- a/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2b1a80c1f6825f1b14babaa788fd0350a6f564c9..ea969d79fc3ee4a186a62e226fecb4e59d0e025c 100644 +index 81e54058bc5e034b076e2bad1115c53950b3b39b..f4effe6f006df5209cd130f42ff1cd207547bbc5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -156,7 +156,7 @@ import org.slf4j.Logger; @@ -161,7 +161,7 @@ index 2b1a80c1f6825f1b14babaa788fd0350a6f564c9..ea969d79fc3ee4a186a62e226fecb4e5 } catch (Exception ignored) { } // CraftBukkit end -@@ -1554,7 +1558,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0.0D; if (this.player.isOnGround() && !packet.isOnGround() && flag) { diff --git a/patches/server/0157-handle-ServerboundKeepAlivePacket-async.patch b/patches/server/0157-handle-ServerboundKeepAlivePacket-async.patch index 10681102b..05c48ce61 100644 --- a/patches/server/0157-handle-ServerboundKeepAlivePacket-async.patch +++ b/patches/server/0157-handle-ServerboundKeepAlivePacket-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 796c40afe5e9853bba2c23dbd2136e969c78f7cd..11b409b97529afe837a63620807958dbf602cf4e 100644 +index 9eb204ba4df5064fcca40c9445a5fc6a10d1b3aa..96091153862433ffe2fdc90c00f1cc6be02e8977 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3225,14 +3225,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3233,14 +3233,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { diff --git a/patches/server/0159-revert-serverside-behavior-of-keepalives.patch b/patches/server/0159-revert-serverside-behavior-of-keepalives.patch index 44e1901c5..27d0bf317 100644 --- a/patches/server/0159-revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/0159-revert-serverside-behavior-of-keepalives.patch @@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a653717d0a18a 100644 +index 96091153862433ffe2fdc90c00f1cc6be02e8977..90b09d4fcb267dff4ab3c910948876a4408abcd1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -253,7 +253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -256,7 +256,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public ServerPlayer player; private int tickCount; private int ackBlockChangesUpTo = -1; @@ -29,7 +29,7 @@ index 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a6537 private boolean keepAlivePending; private long keepAliveChallenge; // CraftBukkit start - multithreaded fields -@@ -290,6 +290,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -293,6 +293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private final SignedMessageChain.Decoder signedMessageDecoder; private final LastSeenMessagesValidator lastSeenMessagesValidator; private final FutureChain chatMessageChain; @@ -37,7 +37,7 @@ index 1be835e21c1400bbd4f6b793061c3d9f9c0625cd..0a2a55979ee58458928f78f1383a6537 public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -388,18 +389,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -391,18 +392,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } this.server.getProfiler().push("keepAlive"); diff --git a/patches/server/0166-AsyncTabCompleteEvent.patch b/patches/server/0166-AsyncTabCompleteEvent.patch index 04ca1cc25..ab9832afe 100644 --- a/patches/server/0166-AsyncTabCompleteEvent.patch +++ b/patches/server/0166-AsyncTabCompleteEvent.patch @@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0ad2e5102df956040715ed77bfa0eb41663b23bc..a9c52b6759aa1f17ecc4c365892c48d8e80c3fe3 100644 +index 90b09d4fcb267dff4ab3c910948876a4408abcd1..d5861e01f7bc18a95f9287128aa829a28780e8c4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -781,27 +781,58 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -784,27 +784,58 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } @@ -85,7 +85,7 @@ index 0ad2e5102df956040715ed77bfa0eb41663b23bc..a9c52b6759aa1f17ecc4c365892c48d8 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index adb3c54932a90c4881e6db0ed037d033220e9a7e..be5982fea6f354131e4562e2a109b4c56c77bcd9 100644 +index 90d88637b5690524d1899541abbb310d330d0e50..565ae5e0dc0db9aaf694003cb30e9af3ff6fc78d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2086,7 +2086,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index e50c5ec65..250b4dfb8 100644 --- a/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a9c52b6759aa1f17ecc4c365892c48d8e80c3fe3..9e0905b5cd2648f606276fa4408301e08aa0bc62 100644 +index d5861e01f7bc18a95f9287128aa829a28780e8c4..727350fb397e9be2917fa383dc6b8abeb15670e7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3239,9 +3239,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3247,9 +3247,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic FilteredText filteredtext = (FilteredText) signText.get(i); if (this.player.isTextFilteringEnabled()) { diff --git a/patches/server/0215-InventoryCloseEvent-Reason-API.patch b/patches/server/0215-InventoryCloseEvent-Reason-API.patch index 6f1efdffd..d62c93050 100644 --- a/patches/server/0215-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0215-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3d3926a14229d922fb7b7e76c9babb031bf7d9ab..5029436157fe7279a2a583f06b7d02a0413d2178 100644 +index 0b1676f71e8da09af3cc0db1c6c17059a6bcf60c..45038c25904d919e0b69deaecdc09272df05bab4 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1159,7 +1159,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -75,10 +75,10 @@ index 4eb69b62b4c3f568cad83fdc4b19cbde2c588be7..35a6dd9cfed631f66e31c71911433ec8 this.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9e0905b5cd2648f606276fa4408301e08aa0bc62..6f5ee7d4645eb5f5d3235c8b6fe8da476aa371e4 100644 +index 727350fb397e9be2917fa383dc6b8abeb15670e7..f7552186d8a5144c23d495bdc6a450e55d8f40d1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -216,6 +216,7 @@ import org.bukkit.event.inventory.ClickType; +@@ -219,6 +219,7 @@ import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.CraftItemEvent; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; @@ -86,7 +86,7 @@ index 9e0905b5cd2648f606276fa4408301e08aa0bc62..6f5ee7d4645eb5f5d3235c8b6fe8da47 import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.SmithItemEvent; -@@ -2765,10 +2766,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2773,10 +2774,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleContainerClose(ServerboundContainerClosePacket packet) { @@ -173,7 +173,7 @@ index 4ff81744b7c9113f57cf1fa89bb943902711b2dc..404ed5e8f54d70a50de4232c6ea0f616 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 751aa3bb55bdd52b3b7e356e5922f21bb4981ad7..21aedf1536b5b4a87fc952ea174a7be41fcde522 100644 +index 7234e96d6d956d84fbcbcb321c1fb05906da6adb..69c3602abfddc9c065736cf08c32f88029df0e5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1079,7 +1079,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 24da5fe2d..f381a0ed7 100644 --- a/patches/server/0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/patches/server/0217-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6f5ee7d4645eb5f5d3235c8b6fe8da476aa371e4..bc4a9c972c04114f1dc37d1789fccd2e05d46d58 100644 +index f7552186d8a5144c23d495bdc6a450e55d8f40d1..abd3899c41c8c8be53cab04d946d15e621369d9a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2650,6 +2650,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2658,6 +2658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (event.isCancelled()) { diff --git a/patches/server/0234-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0234-Break-up-and-make-tab-spam-limits-configurable.patch index b1be18d8f..d6f929806 100644 --- a/patches/server/0234-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0234-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2d3d616b32caa23455aa94d162eb39e8bf617215..f31242fdfe6d3a643804da9bf8387f834f494f42 100644 +index abd3899c41c8c8be53cab04d946d15e621369d9a..0bac1fa4637d7132871b8f57b0431724bc9aa8c1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -259,6 +259,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -262,6 +262,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private long keepAliveChallenge; // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); @@ -33,7 +33,7 @@ index 2d3d616b32caa23455aa94d162eb39e8bf617215..f31242fdfe6d3a643804da9bf8387f83 // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -413,6 +414,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -416,6 +417,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.server.getProfiler().pop(); // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; @@ -41,7 +41,7 @@ index 2d3d616b32caa23455aa94d162eb39e8bf617215..f31242fdfe6d3a643804da9bf8387f83 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -790,7 +792,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -793,7 +795,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start diff --git a/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch b/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch index fa558e1f5..2a51a5d5f 100644 --- a/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/0252-Asynchronous-chunk-IO-and-loading.patch @@ -2278,7 +2278,7 @@ index 97b29bcb20e199c2d02457f8025e67e2d4a925fc..8fda43173012ed3134ed1f114143ceaa DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, config.get(), ops.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7e57eb82dfb069e765f3d77991e4c54ccc0a3053..f147d68767dc92158c4163d5d67c8acddbc55db8 100644 +index 78f7f5603f6949c6aa92726d99e93ebdfea2b637..802b7767dd0878cf6d2e52bea74d5664f7d0664f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -956,7 +956,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop comparator; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f31242fdfe6d3a643804da9bf8387f834f494f42..3ec50cc71758d0178dfb9a9b70e8fc9050d530f3 100644 +index 0bac1fa4637d7132871b8f57b0431724bc9aa8c1..d991354d65305ab7d02666f7c3362e4136c3f6af 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -796,6 +796,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -799,6 +799,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper return; } diff --git a/patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch index aa21a434f..bcbabba35 100644 --- a/patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc03199d5e6 100644 +index d991354d65305ab7d02666f7c3362e4136c3f6af..5beba7d1ba44bde3d9cefccc80b6b8795a47b945 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -568,9 +568,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -571,9 +571,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d0 = entity.getX(); double d1 = entity.getY(); double d2 = entity.getZ(); @@ -22,7 +22,7 @@ index 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc0 float f = Mth.wrapDegrees(packet.getYRot()); float f1 = Mth.wrapDegrees(packet.getXRot()); double d6 = d3 - this.vehicleFirstGoodX; -@@ -605,6 +605,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -608,6 +608,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } speed *= 2f; // TODO: Get the speed of the vehicle instead of the player @@ -39,7 +39,7 @@ index 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc0 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); -@@ -1254,9 +1264,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1257,9 +1267,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.allowedPlayerTicks = 20; // CraftBukkit } else { this.awaitingTeleportTime = this.tickCount; @@ -52,7 +52,7 @@ index 64d80c0329fd9fc8fa2411805adc9d90626bdc4f..475b2165ae56b76a02b80c95b68fdbc0 float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); -@@ -1312,6 +1322,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1315,6 +1325,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else { speed = this.player.getAbilities().walkingSpeed * 10f; } diff --git a/patches/server/0283-Don-t-allow-digging-into-unloaded-chunks.patch b/patches/server/0283-Don-t-allow-digging-into-unloaded-chunks.patch index e624d669a..333ff2365 100644 --- a/patches/server/0283-Don-t-allow-digging-into-unloaded-chunks.patch +++ b/patches/server/0283-Don-t-allow-digging-into-unloaded-chunks.patch @@ -59,10 +59,10 @@ index 53717a4a2bfd841346c00b5f854899e23661122c..3fadf6b46cc722ad81cf810c0761cf71 this.level.destroyBlockProgress(this.player.getId(), pos, -1); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 475b2165ae56b76a02b80c95b68fdbc03199d5e6..ef180347fc39b2b6b8665284d967103c26aaddbd 100644 +index 5beba7d1ba44bde3d9cefccc80b6b8795a47b945..e107aa00f51430a38e190be6d8b1ccba70a3c055 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1672,6 +1672,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1675,6 +1675,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: diff --git a/patches/server/0289-Book-Size-Limits.patch b/patches/server/0289-Book-Size-Limits.patch index 5beb93a92..4a91022d7 100644 --- a/patches/server/0289-Book-Size-Limits.patch +++ b/patches/server/0289-Book-Size-Limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ef180347fc39b2b6b8665284d967103c26aaddbd..19924f3d45af6c4006bd2d921cbeab67a4846059 100644 +index e107aa00f51430a38e190be6d8b1ccba70a3c055..c1270536fc3566454c98419f4bddc0b3b684d63b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1121,6 +1121,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1124,6 +1124,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/patches/server/0297-Implement-Brigadier-Mojang-API.patch b/patches/server/0297-Implement-Brigadier-Mojang-API.patch index 34d738a5e..df0d54f64 100644 --- a/patches/server/0297-Implement-Brigadier-Mojang-API.patch +++ b/patches/server/0297-Implement-Brigadier-Mojang-API.patch @@ -106,10 +106,10 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 19924f3d45af6c4006bd2d921cbeab67a4846059..81c6dd957eb990708fd5f6a1b991a5e8370acf80 100644 +index c1270536fc3566454c98419f4bddc0b3b684d63b..1454d5c070bb004d75523d69eaa3d0d382944198 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -833,8 +833,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -836,8 +836,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ParseResults parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { @@ -124,7 +124,7 @@ index 19924f3d45af6c4006bd2d921cbeab67a4846059..81c6dd957eb990708fd5f6a1b991a5e8 }); }); } -@@ -849,7 +853,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -852,7 +856,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip())); } }); diff --git a/patches/server/0299-Limit-Client-Sign-length-more.patch b/patches/server/0299-Limit-Client-Sign-length-more.patch index 965699580..7444d0ad4 100644 --- a/patches/server/0299-Limit-Client-Sign-length-more.patch +++ b/patches/server/0299-Limit-Client-Sign-length-more.patch @@ -22,10 +22,10 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 81c6dd957eb990708fd5f6a1b991a5e8370acf80..933d74f48dfedc15eec76b4e376e51c40bc4bea5 100644 +index 1454d5c070bb004d75523d69eaa3d0d382944198..db3b208e560ae2c8a59bfb474f7b2266d108068f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -293,6 +293,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private final LastSeenMessagesValidator lastSeenMessagesValidator; private final FutureChain chatMessageChain; private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit @@ -33,7 +33,7 @@ index 81c6dd957eb990708fd5f6a1b991a5e8370acf80..933d74f48dfedc15eec76b4e376e51c4 public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -3286,7 +3287,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3294,7 +3295,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/server/0306-Update-entity-Metadata-for-all-tracked-players.patch b/patches/server/0306-Update-entity-Metadata-for-all-tracked-players.patch index ee43d26bb..1ca13e50f 100644 --- a/patches/server/0306-Update-entity-Metadata-for-all-tracked-players.patch +++ b/patches/server/0306-Update-entity-Metadata-for-all-tracked-players.patch @@ -22,22 +22,22 @@ index d6f34adbdf45bbef4a39e629dd7cb6d7fcb5db0f..7881176a900daa3306c691454f688c1f this.broadcast.accept(packet); if (this.entity instanceof ServerPlayer) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 933d74f48dfedc15eec76b4e376e51c40bc4bea5..90af6b5e7f6188eec4a4e311a0d273857d3d1c5c 100644 +index db3b208e560ae2c8a59bfb474f7b2266d108068f..75cd936e28c3c933c53513093634a9d071a7f94b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2727,7 +2727,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2730,7 +2730,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) { // Refresh the current entity metadata - ServerGamePacketListenerImpl.this.send(new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true)); + // Paper start - update entity for all players -+ ClientboundSetEntityDataPacket packet1 = new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true); ++ ClientboundSetEntityDataPacket entityDataPacket = new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true); + if (entity.tracker != null) { -+ entity.tracker.broadcast(packet1); ++ entity.tracker.broadcast(entityDataPacket); + } else { -+ ServerGamePacketListenerImpl.this.send(packet1); ++ ServerGamePacketListenerImpl.this.send(entityDataPacket); + } + // Paper end - } - - if (event.isCancelled()) { + // SPIGOT-7136 - Allays + if (entity instanceof Allay) { + ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); diff --git a/patches/server/0315-Fix-CB-call-to-changed-postToMainThread-method.patch b/patches/server/0315-Fix-CB-call-to-changed-postToMainThread-method.patch index f9bea9a27..97729ec72 100644 --- a/patches/server/0315-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/patches/server/0315-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 90af6b5e7f6188eec4a4e311a0d273857d3d1c5c..db079ad6516eba21915713be4d99f9566da47945 100644 +index 75cd936e28c3c933c53513093634a9d071a7f94b..0b31a2e2d3bde184c9e1ef9d4ff08e94da0a6960 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -516,7 +516,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -519,7 +519,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Objects.requireNonNull(this.connection); // CraftBukkit - Don't wait diff --git a/patches/server/0317-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/patches/server/0317-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 2b09531f3..c8325ee86 100644 --- a/patches/server/0317-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/patches/server/0317-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8c48544daae0f18a39511df12f7066fc0e383d2c..49fe89baab93ae99a990684d78c5c05a223282c1 100644 +index 1d554a45097cdf0640788bb796b983f18af31a9f..f7d7e69e29f217c233869951d7d3188816f8216c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2311,7 +2311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1); public static final TicketType PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 84a1c8d7750a0a33c5f1338d0784e076ed223dac..dc75a945a747e6140a5227819e4bb180f4ccb0c8 100644 +index 0df93b204ddf55a2a3b8af33d6a3273697eea91e..cadc14777f6a978d4a58bbaf1b606a53c28b2c08 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -251,6 +251,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -254,6 +254,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final int PENDING_MESSAGE_DISCONNECT_THRESHOLD = 4096; public final Connection connection; private final MinecraftServer server; @@ -48,7 +48,7 @@ index 84a1c8d7750a0a33c5f1338d0784e076ed223dac..dc75a945a747e6140a5227819e4bb180 public ServerPlayer player; private int tickCount; private int ackBlockChangesUpTo = -1; -@@ -343,6 +344,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -346,6 +347,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void tick() { @@ -64,7 +64,7 @@ index 84a1c8d7750a0a33c5f1338d0784e076ed223dac..dc75a945a747e6140a5227819e4bb180 if (this.ackBlockChangesUpTo > -1) { this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo)); this.ackBlockChangesUpTo = -1; -@@ -389,7 +399,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -392,7 +402,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.lastVehicle = null; this.clientVehicleIsFloating = false; this.aboveGroundVehicleTickCount = 0; diff --git a/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch index c7b30f9fe..93013fac5 100644 --- a/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dc75a945a747e6140a5227819e4bb180f4ccb0c8..479365c3b632e74f693b3d3da46e8f1c6eae055e 100644 +index cadc14777f6a978d4a58bbaf1b606a53c28b2c08..7b6dedcf405e3f9ff85ebe8702ab6459385c5ff9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -970,7 +970,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -973,7 +973,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePickItem(ServerboundPickItemPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/server/0407-Prevent-teleporting-dead-entities.patch b/patches/server/0407-Prevent-teleporting-dead-entities.patch index 426450f4c..4b8c3b56d 100644 --- a/patches/server/0407-Prevent-teleporting-dead-entities.patch +++ b/patches/server/0407-Prevent-teleporting-dead-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 479365c3b632e74f693b3d3da46e8f1c6eae055e..d8517a11187baddb82c56045d34c4e9db05826be 100644 +index 7b6dedcf405e3f9ff85ebe8702ab6459385c5ff9..0bfd835a22b8bc353878f3f9b04564d6f3049279 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1635,6 +1635,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1638,6 +1638,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set, boolean flag) { diff --git a/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch index 0ba887395..80b8c23d4 100644 --- a/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d8517a11187baddb82c56045d34c4e9db05826be..870935874baa29edd1c641869c5f6a22155f2e8f 100644 +index 0bfd835a22b8bc353878f3f9b04564d6f3049279..a8014da4583bac40deecd439bb59287bf1de56f4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1449,6 +1449,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1452,6 +1452,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move diff --git a/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch index 12803bafb..5fbd29a58 100644 --- a/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 870935874baa29edd1c641869c5f6a22155f2e8f..237bf7e97dc89a551feb28914317344207a28e13 100644 +index a8014da4583bac40deecd439bb59287bf1de56f4..74df19cb16ea840f8d5d5354906f16757d5fe56d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3228,9 +3228,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3236,9 +3236,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!this.player.containerMenu.stillValid(this.player)) { ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu); } else { diff --git a/patches/server/0439-Add-permission-for-command-blocks.patch b/patches/server/0439-Add-permission-for-command-blocks.patch index 2ccc09c36..b3d3be6d0 100644 --- a/patches/server/0439-Add-permission-for-command-blocks.patch +++ b/patches/server/0439-Add-permission-for-command-blocks.patch @@ -18,10 +18,10 @@ index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4 return false; } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 237bf7e97dc89a551feb28914317344207a28e13..893b9557d742ad1d74a7f6a772c4f8f45a7172f6 100644 +index 74df19cb16ea840f8d5d5354906f16757d5fe56d..cf53c3cdbfd0a610aedee474c164f2d1ca5dacad 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -881,7 +881,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -884,7 +884,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); @@ -30,7 +30,7 @@ index 237bf7e97dc89a551feb28914317344207a28e13..893b9557d742ad1d74a7f6a772c4f8f4 this.player.sendSystemMessage(Component.translatable("advMode.notAllowed")); } else { BaseCommandBlock commandblocklistenerabstract = null; -@@ -948,7 +948,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -951,7 +951,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); diff --git a/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 36d7c6444..4e360c653 100644 --- a/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b6a05542a42b1f44b3a43fbcd333003e864e44ea..f2e6c5ed099a94be3aefca55cffd8e2447e39ac2 100644 +index 9c2589c7e0517f771b9ca06760273a0aecefb27d..7d2fee97f4d08eae245475c4b60c1a7ba46c840d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -791,7 +791,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 1.0D) { -@@ -1411,9 +1433,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1414,9 +1436,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic AABB axisalignedbb = this.player.getBoundingBox(); diff --git a/patches/server/0521-Add-API-for-quit-reason.patch b/patches/server/0521-Add-API-for-quit-reason.patch index 33be27aec..069a5da48 100644 --- a/patches/server/0521-Add-API-for-quit-reason.patch +++ b/patches/server/0521-Add-API-for-quit-reason.patch @@ -37,10 +37,10 @@ index 6f2b52165c1935511790a429792d3754251537c8..9b4436bdb697d8350eac57282f8fad81 public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile, publicKey); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9b4d5d1745101b28048df16dabc5d983a65eb0bd..b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8 100644 +index a33334b45493c714b48439986b484256c03bdf8e..cf490d9f622e7300c36aa4776987e328d151097d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -518,6 +518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -521,6 +521,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end diff --git a/patches/server/0534-Limit-recipe-packets.patch b/patches/server/0534-Limit-recipe-packets.patch index 4d82c8696..4bf6259d4 100644 --- a/patches/server/0534-Limit-recipe-packets.patch +++ b/patches/server/0534-Limit-recipe-packets.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8..25b44f5f83bf03fb6910b06c79f35ac10bf50e3a 100644 +index cf490d9f622e7300c36aa4776987e328d151097d..8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -264,6 +264,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits @@ -16,7 +16,7 @@ index b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8..25b44f5f83bf03fb6910b06c79f35ac1 // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -428,6 +429,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -431,6 +432,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable @@ -24,7 +24,7 @@ index b0f9ebcf04a562ce2f0fbee01b731e4fa1c1eab8..25b44f5f83bf03fb6910b06c79f35ac1 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -3247,6 +3249,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3255,6 +3257,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch index c46cff9f2..b7969d61a 100644 --- a/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch +++ b/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix interact event not being called in adventure Call PlayerInteractEvent when left-clicking on a block in adventure mode diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 25b44f5f83bf03fb6910b06c79f35ac10bf50e3a..7db3c6502eb15192e876f5c766bf64c30f52e9c4 100644 +index 8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0..9da69a6e4d20e6b5f702f3a307239d789654de60 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1855,7 +1855,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1858,7 +1858,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); this.player.sendSystemMessage(ichatmutablecomponent, true); @@ -18,7 +18,7 @@ index 25b44f5f83bf03fb6910b06c79f35ac10bf50e3a..7db3c6502eb15192e876f5c766bf64c3 this.player.swing(enumhand, true); } } -@@ -2615,7 +2615,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2618,7 +2618,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Vec3 vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); HitResult movingobjectposition = this.player.level.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.player)); diff --git a/patches/server/0557-Added-ServerResourcesReloadedEvent.patch b/patches/server/0557-Added-ServerResourcesReloadedEvent.patch index d1d3f6816..d030c34c5 100644 --- a/patches/server/0557-Added-ServerResourcesReloadedEvent.patch +++ b/patches/server/0557-Added-ServerResourcesReloadedEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 52a60c887753fce32f99adaee8b73077bde663e9..e72af8f8c49dabcbe1d0a80176520ccdb55b1f5b 100644 +index f02fc7d6d8d0aba84be5e85c8de0ccc0e5a01c78..5c3b5cb0ffc3920da82b525bbc7a8963c981c595 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1978,7 +1978,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error -@@ -2004,6 +2010,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(Class apiClass, ResourceKey> resourceKey) { +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e72af8f8c49dabcbe1d0a80176520ccdb55b1f5b..9484e447959a9c25ac6ef318be1569d236b5915d 100644 +index 5c3b5cb0ffc3920da82b525bbc7a8963c981c595..d60439d49de781b12af6fbe4ff89b7270f57cbeb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2010,6 +2010,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 0 && packet.getSlot() < Inventory.getSelectionSize()) { diff --git a/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch index bdc36042b..9e6260fe4 100644 --- a/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 26c707199cb3c87b3b56c28b2d4a1eaa8dd0b106..9e3c6ff6b7db0c6add4fe76d20fdfaff88239660 100644 +index 2723bb42f3618fa57f3996b7880484d88afb552d..8dc4eac46bb7f127cb23d3994308d6ceb5dfedf5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2894,7 +2894,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2902,7 +2902,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic case PERFORM_RESPAWN: if (this.player.wonGame) { this.player.wonGame = false; diff --git a/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch index db50c8fe4..38bab498e 100644 --- a/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch @@ -126,10 +126,10 @@ index 32746dfbc2fdfc150583676b1bf0762398b76d75..1ad1f958a9b6e1bc21f1c505aa7ea549 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9e3c6ff6b7db0c6add4fe76d20fdfaff88239660..1811c6492d5fb5910b15b3d95506076245cd8b89 100644 +index 8dc4eac46bb7f127cb23d3994308d6ceb5dfedf5..1b6cad1fda904a1c76af508325c21c1db642e8ff 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2903,7 +2903,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2911,7 +2911,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false); if (this.server.isHardcore()) { @@ -139,7 +139,7 @@ index 9e3c6ff6b7db0c6add4fe76d20fdfaff88239660..1811c6492d5fb5910b15b3d955060762 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8024b7bcc18a9b2298864d53230d54c23b9d1166..b7803148a96bdf69e1208105ee0ddecf6d9662f0 100644 +index 8608fbd5484498f0e478d857ea1dd548ad6a93e0..0004b78b63a2bf4b34467f9a550f6f0807e4dfb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1396,7 +1396,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0645-Move-range-check-for-block-placing-up.patch b/patches/server/0645-Move-range-check-for-block-placing-up.patch index 90ade9e8b..911af5fa0 100644 --- a/patches/server/0645-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0645-Move-range-check-for-block-placing-up.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1811c6492d5fb5910b15b3d95506076245cd8b89..f54a2fd855c0a901ee72258b7a315d0c1caf4ff0 100644 +index 1b6cad1fda904a1c76af508325c21c1db642e8ff..2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1833,6 +1833,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1836,6 +1836,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ItemStack itemstack = this.player.getItemInHand(enumhand); BlockHitResult movingobjectpositionblock = packet.getHitResult(); Vec3 vec3d = movingobjectpositionblock.getLocation(); diff --git a/patches/server/0654-Add-PlayerKickEvent-causes.patch b/patches/server/0654-Add-PlayerKickEvent-causes.patch index a64f1cbb4..23347e20c 100644 --- a/patches/server/0654-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0654-Add-PlayerKickEvent-causes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 749421b638bbb5868a426888e42edc461ad0edf3..4f14a5d9b9b14727021fcb2491c15b9978f17f10 100644 +index 84e76fbe3eca77b112c9dff936e21cba1c83e5aa..98fe4165d291b47a39ce741884353c87dd0a4789 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2102,7 +2102,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); @@ -69,7 +69,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } } else { -@@ -391,7 +391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -394,7 +394,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); @@ -78,7 +78,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } } else { -@@ -413,7 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -416,7 +416,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.keepAlivePending) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info @@ -87,7 +87,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } } else { if (elapsedTime >= 15000L) { // 15 seconds -@@ -443,7 +443,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -446,7 +446,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) (this.server.getPlayerIdleTimeout() * 1000 * 60)) { this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 @@ -96,7 +96,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } this.chatPreviewThrottler.tick(); -@@ -467,16 +467,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -470,16 +470,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return this.server.isSingleplayerOwner(this.player.getGameProfile()); } @@ -126,7 +126,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 // Paper end // CraftBukkit start - fire PlayerKickEvent if (this.processedDisconnect) { -@@ -505,7 +515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -508,7 +518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure @@ -135,7 +135,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); -@@ -575,7 +585,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -578,7 +588,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMoveVehicle(ServerboundMoveVehiclePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(), packet.getY(), packet.getZ(), packet.getYRot(), packet.getXRot())) { @@ -144,7 +144,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } else { Entity entity = this.player.getRootVehicle(); -@@ -773,7 +783,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -776,7 +786,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { @@ -153,7 +153,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } -@@ -830,13 +840,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -833,13 +843,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -169,7 +169,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } // Paper end -@@ -989,7 +999,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -992,7 +1002,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start - validate pick item position if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -178,7 +178,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed -@@ -1176,7 +1186,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1179,7 +1189,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; if (byteLength > 256 * 4) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!"); @@ -187,7 +187,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } byteTotal += byteLength; -@@ -1199,14 +1209,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1202,14 +1212,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); @@ -204,7 +204,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } this.lastBookTick = MinecraftServer.currentTick; -@@ -1330,7 +1340,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1333,7 +1343,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) { @@ -213,7 +213,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } else { ServerLevel worldserver = this.player.getLevel(); -@@ -1757,7 +1767,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1760,7 +1770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.dropCount++; if (this.dropCount >= 20) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!"); @@ -222,7 +222,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } } -@@ -1965,7 +1975,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1968,7 +1978,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); @@ -231,7 +231,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } // Paper start PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()]; -@@ -2078,7 +2088,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2081,7 +2091,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetLastActionTime(); } else { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -240,7 +240,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } } -@@ -2091,7 +2101,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2094,7 +2104,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { @@ -249,7 +249,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } else { if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { // this.server.submit(() -> { // CraftBukkit - async chat -@@ -2119,7 +2129,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2122,7 +2132,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -258,7 +258,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } else { if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { this.server.submit(() -> { -@@ -2205,7 +2215,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2208,7 +2218,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); @@ -267,7 +267,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return false; } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); -@@ -2464,7 +2474,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2467,7 +2477,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (!playerchatmessage.verify(chatsender)) { @@ -276,7 +276,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return false; } } -@@ -2492,7 +2502,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2495,7 +2505,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // this.chatSpamTickCount += 20; if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // CraftBukkit end @@ -285,7 +285,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } } -@@ -2595,7 +2605,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2598,7 +2608,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private void handleValidationFailure(Set reasons) { ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(","))); @@ -294,7 +294,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } @Override -@@ -2742,7 +2752,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2745,7 +2755,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (i > 4096) { @@ -303,7 +303,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } } -@@ -2757,7 +2767,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2760,7 +2770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -312,7 +312,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } // Spigot End -@@ -2850,7 +2860,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2858,7 +2868,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end } else { @@ -321,7 +321,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } } -@@ -3258,7 +3268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3266,7 +3276,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -330,7 +330,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 return; } } -@@ -3461,7 +3471,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3469,7 +3479,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else if (!this.isSingleplayerOwner()) { // Paper start - This needs to be handled on the main thread for plugins server.submit(() -> { @@ -339,7 +339,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 }); // Paper end } -@@ -3507,7 +3517,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3515,7 +3525,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); @@ -348,7 +348,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } } else if (packet.identifier.equals(CUSTOM_UNREGISTER)) { try { -@@ -3517,7 +3527,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3525,7 +3535,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); @@ -357,7 +357,7 @@ index f54a2fd855c0a901ee72258b7a315d0c1caf4ff0..1b1bf6fdc29a78b70eb39ce0770056a0 } } else { try { -@@ -3535,7 +3545,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3543,7 +3553,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); @@ -391,7 +391,7 @@ index 63f92d68b91f1049802a1541c7ec4efaa324ac11..c332750833cccee1264a3399ed0539f6 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b7803148a96bdf69e1208105ee0ddecf6d9662f0..bf5931cbcfbfdc6e68706b7e86b24b2478e4bbef 100644 +index 0004b78b63a2bf4b34467f9a550f6f0807e4dfb4..4750ac09f2abfb712b042028a95d23121ffc049f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -516,7 +516,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch index 76c5d7730..1901b7c97 100644 --- a/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch +++ b/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1b1bf6fdc29a78b70eb39ce0770056a0b92d5e55..6fbba4cb8e3d00ea910c7d32b37b70df7f9cf133 100644 +index 32262185c3997c17f1b5b1847f768789de7659e6..c59cfe44536b62e1853903bd22990197b9d85083 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1216,7 +1216,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1219,7 +1219,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper end // CraftBukkit start if (this.lastBookTick + 20 > MinecraftServer.currentTick) { diff --git a/patches/server/0675-Adds-PlayerArmSwingEvent.patch b/patches/server/0675-Adds-PlayerArmSwingEvent.patch index da990a896..60040336f 100644 --- a/patches/server/0675-Adds-PlayerArmSwingEvent.patch +++ b/patches/server/0675-Adds-PlayerArmSwingEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6fbba4cb8e3d00ea910c7d32b37b70df7f9cf133..dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec 100644 +index c59cfe44536b62e1853903bd22990197b9d85083..93dc44365bb3140a4b6989f1d520091c4b35e76e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2636,7 +2636,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2639,7 +2639,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Arm swing animation diff --git a/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch index 496092646..a22f7963e 100644 --- a/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch @@ -17,10 +17,10 @@ index 9a60cf249e0b9f089b0966c670e6046e7e1ed08a..787f2b23352fbfb66a76ca5fce6de94c public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1c39ca45b 100644 +index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef46404e782 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -525,7 +525,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -528,7 +528,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Do not kick the player return; } @@ -28,7 +28,7 @@ index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1 // Send the possibly modified leave message final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end -@@ -534,7 +533,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -537,7 +536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> { this.connection.disconnect(ichatbasecomponent); })); @@ -37,7 +37,7 @@ index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1 this.connection.setReadOnly(); MinecraftServer minecraftserver = this.server; Connection networkmanager = this.connection; -@@ -2000,6 +1999,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2003,6 +2002,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void onDisconnect(Component reason) { @@ -49,7 +49,7 @@ index dd1ec83feddecfdd8f2dd8248c3cbca0d55393ec..ab956e3bb44374cf8a3792eeadb1ffb1 // CraftBukkit start - Rarely it would send a disconnect line twice if (this.processedDisconnect) { return; -@@ -2016,7 +2020,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2019,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.disconnect(); // Paper start - Adventure diff --git a/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch index f7208675d..256b53226 100644 --- a/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent AFK kick while watching end credits. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ab956e3bb44374cf8a3792eeadb1ffb1c39ca45b..f9e1057401857ccc48f4655a64f9065dc9d93d5a 100644 +index e1b3045d4fa6f69e9d70279980ab7ef46404e782..6a20b0265b278593c87f61206785090b9392f6d6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -441,7 +441,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -444,7 +444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic --this.dropSpamTickCount; } diff --git a/patches/server/0735-Execute-chunk-tasks-mid-tick.patch b/patches/server/0735-Execute-chunk-tasks-mid-tick.patch index 60e415621..a000a740b 100644 --- a/patches/server/0735-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0735-Execute-chunk-tasks-mid-tick.patch @@ -19,7 +19,7 @@ index 23e564b05ba438924180c91f9b19a60731eedd1b..5ec241d49ff5e3a161a39006f05823a5 private MinecraftTimings() {} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4f14a5d9b9b14727021fcb2491c15b9978f17f10..2d94390e3b9fa3afd2471cc691d59de0f470b46c 100644 +index 98fe4165d291b47a39ce741884353c87dd0a4789..99073ea2757cd1c15b098d7cfaf8681702f04a19 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1304,6 +1304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); ++ if (entity instanceof Allay allay) { // Paper ++ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta + player.containerMenu.sendAllDataToRemote(); + } + } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java index d8522072adb93d47fdd7cfa947132c23c2386952..8dc54061802f0253193bda79bded1d5265591519 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch index 3a3b5f4d7..2f406412e 100644 --- a/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1861708d7 100644 +index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95e29be9a8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -658,7 +658,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -661,7 +661,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -18,7 +18,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above -@@ -666,6 +666,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -669,6 +669,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = entity.verticalCollisionBelow; entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); @@ -26,7 +26,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 double d11 = d7; d6 = d3 - entity.getX(); -@@ -679,16 +680,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -682,16 +683,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot @@ -54,7 +54,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 entity.absMoveTo(d0, d1, d2, f, f1); this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit this.connection.send(new ClientboundMoveVehiclePacket(entity)); -@@ -774,7 +783,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -777,7 +786,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private boolean noBlocksAround(Entity entity) { @@ -88,7 +88,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 } @Override -@@ -1354,7 +1388,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1357,7 +1391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (this.awaitingPositionFromClient != null) { @@ -97,7 +97,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 this.awaitingTeleportTime = this.tickCount; this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); } -@@ -1448,7 +1482,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1451,7 +1485,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -106,7 +106,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 d7 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above d8 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above -@@ -1489,6 +1523,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1492,6 +1526,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = this.player.verticalCollisionBelow; this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); @@ -114,7 +114,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move // Paper start - prevent position desync if (this.awaitingPositionFromClient != null) { -@@ -1508,12 +1543,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1511,12 +1546,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot @@ -140,7 +140,7 @@ index c4fd848c540eb70502b5073a4a50bef90c1c33b0..c3ce4657e9eed5a398352b362d0ee6a1 this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. } else { // CraftBukkit start - fire PlayerMoveEvent -@@ -1599,6 +1645,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1602,6 +1648,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } diff --git a/patches/server/0832-Kick-on-main-for-illegal-chat.patch b/patches/server/0832-Kick-on-main-for-illegal-chat.patch index cb17ae7b5..475571bd7 100644 --- a/patches/server/0832-Kick-on-main-for-illegal-chat.patch +++ b/patches/server/0832-Kick-on-main-for-illegal-chat.patch @@ -7,10 +7,10 @@ Makes the PlayerKickEvent fire on the main thread for illegal characters or chat out-of-order errors. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c3ce4657e9eed5a398352b362d0ee6a1861708d7..9034b997fdbe5ca1c71eb154205510e99865dc3d 100644 +index 36c37ae73696a5fe443e7fd6614bca95e29be9a8..e16de9e1cf9c6d5377f7ce434cc737056093e71f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2177,7 +2177,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2180,7 +2180,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { @@ -20,7 +20,7 @@ index c3ce4657e9eed5a398352b362d0ee6a1861708d7..9034b997fdbe5ca1c71eb154205510e9 } else { if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { // this.server.submit(() -> { // CraftBukkit - async chat -@@ -2205,7 +2207,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2208,7 +2210,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -30,7 +30,7 @@ index c3ce4657e9eed5a398352b362d0ee6a1861708d7..9034b997fdbe5ca1c71eb154205510e9 } else { if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { this.server.submit(() -> { -@@ -2291,7 +2295,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2294,7 +2298,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); diff --git a/patches/server/0851-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0851-Put-world-into-worldlist-before-initing-the-world.patch index 1dd470f66..af8347ac9 100644 --- a/patches/server/0851-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0851-Put-world-into-worldlist-before-initing-the-world.patch @@ -7,34 +7,34 @@ Some parts of legacy conversion will need the overworld to get the legacy structure data storage diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index faa380a0119d5827735a45104beef9880992240a..cd1edd0cb404cab5e71efdb82f3b911c2fe96d01 100644 +index d53972b69322e03d7e8054a2dcdbdb963055988c..5f3592f570fae791f2bd55d05d02c8bb5ecc0f85 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -601,9 +601,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper - push to main this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause }); // Paper - push to main -@@ -2568,7 +2568,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2571,7 +2571,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (playerchatmessage.hasExpiredServer(Instant.now())) { diff --git a/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index 81b721d85..124437ae7 100644 --- a/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9ed83f352cf9d1ea0d869436796f0073412d72c7..71279d9c4d3c728f828eb8a5a2d7b435e527c01b 100644 +index 421f8d21f3edb65b42bf7228989bd95877976e06..e2197e11f8ec49495802f7d265709d716bc0524c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2588,7 +2588,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2591,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end // this.chatSpamTickCount += 20; diff --git a/patches/server/0919-More-Teleport-API.patch b/patches/server/0919-More-Teleport-API.patch index 6e347143c..e3daa5b39 100644 --- a/patches/server/0919-More-Teleport-API.patch +++ b/patches/server/0919-More-Teleport-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More Teleport API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 71279d9c4d3c728f828eb8a5a2d7b435e527c01b..07af82f89b417586aeb9b4b0a44562665a824f3b 100644 +index e2197e11f8ec49495802f7d265709d716bc0524c..ad6ae4a8c9e5af5f75d796add202bd8b2dec701a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1732,11 +1732,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1735,11 +1735,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return false; // CraftBukkit - Return event status } @@ -69,7 +69,7 @@ index 2a6c67634c31c332102d24bef293da1bacd0c000..b80cc0938b2b3928f4450f1314a9fbd7 // Let the server handle cross world teleports if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2cf84abadc7fd7806566948d4c6e2212bdf2aeb7..e6411d8293c36f41b790cf17ecc507507f04d604 100644 +index 77339926519057b1c878761780ff2d6621f5ccb7..6f0ffd1895a9c392b643f3595e709ec3706c39b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1135,7 +1135,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0922-Send-block-entities-after-destroy-prediction.patch b/patches/server/0922-Send-block-entities-after-destroy-prediction.patch index c1126bbdc..66eaf9d3a 100644 --- a/patches/server/0922-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0922-Send-block-entities-after-destroy-prediction.patch @@ -57,10 +57,10 @@ index 9378e83a67a70dbb1fb4f05b33f1e553d008e62b..5a60f5dc202c44b06ca34e9a19d45cb7 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 07af82f89b417586aeb9b4b0a44562665a824f3b..e0d676f08f99882170307d6996c83f533aef2999 100644 +index ad6ae4a8c9e5af5f75d796add202bd8b2dec701a..d030574fbd282c018898b64b6ced9749f54cb813 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1877,8 +1877,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1880,8 +1880,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } // Paper end - Don't allow digging in unloaded chunks diff --git a/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch b/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch index c445f08b4..691f427e1 100644 --- a/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch +++ b/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix command preprocess cancelling and command changing diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e0d676f08f99882170307d6996c83f533aef2999..f4950ed28a905f7cc227941f9a1f6a1cb64b4eca 100644 +index d030574fbd282c018898b64b6ced9749f54cb813..50d89accf52799de11ab0488e9353ca40f2de3dd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2261,13 +2261,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2264,13 +2264,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server)); this.cserver.getPluginManager().callEvent(event); diff --git a/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch b/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch index 4650d8102..a78a24d0a 100644 --- a/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch +++ b/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add async catcher to PlayerConnection internalTeleport diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f4950ed28a905f7cc227941f9a1f6a1cb64b4eca..dbefefc123e3cb38a95bd321d74c384bc087cfba 100644 +index 50d89accf52799de11ab0488e9353ca40f2de3dd..c3a5aa2cbfeef1d2841ef85d135a2f6e0a7a2f61 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1760,6 +1760,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1763,6 +1763,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set, boolean flag) { diff --git a/work/CraftBukkit b/work/CraftBukkit index c379a6b4e..ead719a65 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit c379a6b4e421561edd6e1a62e2e4410f48bf1ab1 +Subproject commit ead719a65bf1202e32a4d81442a8bde1a62c07fd diff --git a/work/Spigot b/work/Spigot index 584b459dc..450dcaa86 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 584b459dceac6e6f4708b70706671206d7a2c8ea +Subproject commit 450dcaa86efd759674bbdeae0f6a37c97977618e