From d213f7588fb6ee6c1f1377a50ac0681280df12a2 Mon Sep 17 00:00:00 2001 From: mbax Date: Tue, 2 Jul 2013 21:38:01 -0400 Subject: [PATCH] Update client on cancelled entity naming. Fixes BUKKIT-4396 --- src/main/java/net/minecraft/server/PlayerConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index f201933daf..217c5210e6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1110,6 +1110,10 @@ public class PlayerConnection extends Connection { // Refresh the current leash state this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).bE())); } + if (itemInHand != null && itemInHand.id == Item.NAME_TAG.id && entity instanceof EntityInsentient) { + // Refresh the current entity metadata + this.sendPacket(new Packet40EntityMetadata(entity.id, entity.datawatcher, true)); + } return; } // CraftBukkit end