mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
MC-111699: Ignore Improper Anvil Item Name Packets
The client is improperly sending Item Name Packets to the server BEFORE the click event. This causes the server to reset before the click event is processed This breaks the ability to rename more than 1 item at a time. See: https://bugs.mojang.com/browse/MC-111699
This commit is contained in:
parent
61d4b9e2ab
commit
0c4ef7349f
1 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
From dcfe5342a4acd87a6dce020d79cff1ab6410fab9 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 2 Jan 2017 02:07:24 -0500
|
||||
Subject: [PATCH] MC-111699: Ignore Improper Anvil Item Name Packets
|
||||
|
||||
The client is improperly sending Item Name Packets to the server BEFORE
|
||||
the click event. This causes the server to reset before the click event is processed
|
||||
|
||||
This breaks the ability to rename more than 1 item at a time.
|
||||
|
||||
See: https://bugs.mojang.com/browse/MC-111699
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 9f721d88c..3730af8df 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2426,7 +2426,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767));
|
||||
|
||||
if (s4.length() <= 30) {
|
||||
- containeranvil.a(s4);
|
||||
+ if (!s4.isEmpty() || containeranvil.getSlot(2).getItem().isEmpty()) containeranvil.a(s4); // Paper - Hack Fix for MC-111699
|
||||
}
|
||||
} else {
|
||||
containeranvil.a("");
|
||||
--
|
||||
2.11.0
|
||||
|
Loading…
Reference in a new issue