mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 08:56:23 +01:00
update metadata refresh approach
same fix, less work needed to do it
This commit is contained in:
parent
4c807f929e
commit
424b05051b
1 changed files with 5 additions and 9 deletions
|
@ -1,23 +1,19 @@
|
||||||
From ab124ff3d442f70cef7665086a5f34ad13c42105 Mon Sep 17 00:00:00 2001
|
From b75921430d01070026e081910ccfb2785c4a4b24 Mon Sep 17 00:00:00 2001
|
||||||
From: AgentTroll <woodyc40@gmail.com>
|
From: AgentTroll <woodyc40@gmail.com>
|
||||||
Date: Fri, 22 Mar 2019 22:24:03 -0700
|
Date: Fri, 22 Mar 2019 22:24:03 -0700
|
||||||
Subject: [PATCH] Fixes issues with player interaction preventing metadata from
|
Subject: [PATCH] Update entity Metadata for all tracked players
|
||||||
being updated for other players
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
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
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1974,7 +1974,10 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -1974,7 +1974,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||||
|
|
||||||
if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) {
|
if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) {
|
||||||
// Refresh the current entity metadata
|
// Refresh the current entity metadata
|
||||||
- this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true));
|
- this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true));
|
||||||
+ // Paper start - update entity for all players
|
+ entity.tracker.broadcast(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true)); // Paper - update entity for all players
|
||||||
+ // this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true));
|
|
||||||
+ entity.tracker.track(worldserver.players);
|
|
||||||
+ // Paper end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
Loading…
Reference in a new issue