2017-05-14 20:05:01 +02:00
|
|
|
From 2f323655c172118c9ceacf8e7fc3ef927eb5d8f1 Mon Sep 17 00:00:00 2001
|
2017-01-02 08:09:31 +01:00
|
|
|
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
|
2017-05-14 20:05:01 +02:00
|
|
|
index 563781256..dfeadd9b5 100644
|
2017-01-02 08:09:31 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2017-05-14 20:05:01 +02:00
|
|
|
@@ -2529,7 +2529,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
2017-01-02 08:09:31 +01:00
|
|
|
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("");
|
|
|
|
--
|
2017-05-14 20:05:01 +02:00
|
|
|
2.13.0
|
2017-01-02 08:09:31 +01:00
|
|
|
|