aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0812-Treat-sequence-violations-like-they-should-be.patch
diff options
context:
space:
mode:
authorJakub Zacek <[email protected]>2024-07-15 23:35:51 +0200
committerGitHub <[email protected]>2024-07-15 17:35:51 -0400
commit2cd8c461af74f0a524878dcdffba86cd105c48c6 (patch)
treeac107a76fe3d6cdd2e6ef5804ef3cba152957e4c /patches/server/0812-Treat-sequence-violations-like-they-should-be.patch
parentb57b24d549c65ddc5eb3edcc1ecc6aad2826dbd8 (diff)
downloadPaper-2cd8c461af74f0a524878dcdffba86cd105c48c6.tar.gz
Paper-2cd8c461af74f0a524878dcdffba86cd105c48c6.zip
Add OMINOUS_ITEM_SPAWNER SpawnReason (#10897)
Diffstat (limited to 'patches/server/0812-Treat-sequence-violations-like-they-should-be.patch')
-rw-r--r--patches/server/0812-Treat-sequence-violations-like-they-should-be.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0812-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0812-Treat-sequence-violations-like-they-should-be.patch
new file mode 100644
index 0000000000..0a8d25783a
--- /dev/null
+++ b/patches/server/0812-Treat-sequence-violations-like-they-should-be.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Thu, 30 Mar 2023 03:13:58 +0100
+Subject: [PATCH] Treat sequence violations like they should be
+
+
+diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+index 62b022a72954eeecfa141f4ec93ccb44d955e54b..664d9cfacb87b1d9193376261f7102b64c906ddc 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -1977,6 +1977,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+
+ public void ackBlockChangesUpTo(int sequence) {
+ if (sequence < 0) {
++ this.disconnect(Component.literal("Expected packet sequence nr >= 0"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - Treat sequence violations like they should be
+ throw new IllegalArgumentException("Expected packet sequence nr >= 0");
+ } else {
+ this.ackBlockChangesUpTo = Math.max(sequence, this.ackBlockChangesUpTo);