From 310ae5b90002f792e7ac81565a84d55591e662db Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 17:48:22 -0400 Subject: [PATCH] update metadata refresh approach same fix, less work needed to do it --- ...date-entity-Metadata-for-all-tracked-players.patch} | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) rename Spigot-Server-Patches/{Fixes-issues-with-player-interaction-preventing-meta.patch => Update-entity-Metadata-for-all-tracked-players.patch} (67%) diff --git a/Spigot-Server-Patches/Fixes-issues-with-player-interaction-preventing-meta.patch b/Spigot-Server-Patches/Update-entity-Metadata-for-all-tracked-players.patch similarity index 67% rename from Spigot-Server-Patches/Fixes-issues-with-player-interaction-preventing-meta.patch rename to Spigot-Server-Patches/Update-entity-Metadata-for-all-tracked-players.patch index 7a0f38dc64..3e43759be4 100644 --- a/Spigot-Server-Patches/Fixes-issues-with-player-interaction-preventing-meta.patch +++ b/Spigot-Server-Patches/Update-entity-Metadata-for-all-tracked-players.patch @@ -1,12 +1,11 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: AgentTroll Date: Fri, 22 Mar 2019 22:24:03 -0700 -Subject: [PATCH] Fixes issues with player interaction preventing metadata from - being updated for other players +Subject: [PATCH] Update entity Metadata for all tracked players diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c4edb5b85d..d2dd5d5be5 100644 +index c4edb5b85..65e76491b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -14,10 +13,7 @@ index c4edb5b85d..d2dd5d5be5 100644 if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) { // Refresh the current entity metadata - this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true)); -+ // Paper start - update entity for all players -+ // this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true)); -+ entity.tracker.track(worldserver.players); -+ // Paper end ++ entity.tracker.broadcast(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true)); // Paper - update entity for all players } if (event.isCancelled()) {