testserver/Spigot-Server-Patches/0374-Update-entity-Metadata...

23 lines
1.2 KiB
Diff
Raw Normal View History

2019-05-05 17:19:34 +00:00
From 130d65dcf32d7dbe293bad4a3da9acb4c1b3250b Mon Sep 17 00:00:00 2001
From: AgentTroll <woodyc40@gmail.com>
Date: Fri, 22 Mar 2019 22:24:03 -0700
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
2019-05-05 17:19:34 +00:00
index 39a040a2a0..c1d1621d9e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2019-05-05 17:19:34 +00:00
@@ -2021,7 +2021,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
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));
+ entity.tracker.broadcast(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true)); // Paper - update entity for all players
}
if (event.isCancelled()) {
--
2.21.0