Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
f09fed894f
--- work/Bukkit Submodule work/Bukkit 6a4242cb..337955e3: > SPIGOT-5468: Improve Beehive TileEntity API > #473: Add an API for passing the heightmap to getHighestBlockAt* method --- work/CraftBukkit Submodule work/CraftBukkit 807a677e..708be695: > SPIGOT-5468: Improve Beehive TileEntity API > #624: Add an API for passing the heightmap to getHighestBlockAt* method > MC-135989, SPIGOT-5564: Don't kick players for flight while riptiding This deprecates the Paper getHighestBlockAt HeightMap APIs now that Bukkit has added their own. These methods will stick around long enough for people to migrate. Their API is pretty much the same as ours, migration should be quick and easy.
40 Zeilen
1.9 KiB
Diff
40 Zeilen
1.9 KiB
Diff
From 7f1f0a3fd0c347eabb6f3dfbb56b47b98e4932ba 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/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
index 3ff7a7b4a..3a88c9a67 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
|
@@ -387,6 +387,12 @@ public class EntityTrackerEntry {
|
|
return PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc);
|
|
}
|
|
|
|
+ // Paper start - Add broadcast method
|
|
+ void broadcast(Packet<?> packet) {
|
|
+ this.getPacketConsumer().accept(packet);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
private void broadcastIncludingSelf(Packet<?> packet) {
|
|
this.f.accept(packet);
|
|
if (this.tracker instanceof EntityPlayer) {
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 94d3d602c..eee96c3a1 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -2006,7 +2006,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.25.0
|
|
|