summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2013-08-03 17:03:49 -0500
committerWesley Wolfe <weswolf@aol.com>2013-08-03 17:03:49 -0500
commitda5d494b3665f51651ee4f3c31d9f9d6f4a24b47 (patch)
tree7856eaf80a2d1450555478624edb0faa56370e22 /src/main/java/net
parent54672a75f60a69802e7080b526fea737608a2530 (diff)
downloadcraftbukkit-da5d494b3665f51651ee4f3c31d9f9d6f4a24b47.tar
craftbukkit-da5d494b3665f51651ee4f3c31d9f9d6f4a24b47.tar.gz
craftbukkit-da5d494b3665f51651ee4f3c31d9f9d6f4a24b47.tar.lz
craftbukkit-da5d494b3665f51651ee4f3c31d9f9d6f4a24b47.tar.xz
craftbukkit-da5d494b3665f51651ee4f3c31d9f9d6f4a24b47.zip
Update players when coming into view of vehicle. Fixes BUKKIT-4628
When only considering trackers from player perspective, attach entity packet could be sent before a packet for a respective vehicle is in view and will, in turn, be ignored. This adds another notification when the vehicle comes into view to cover all cases.
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/EntityTrackerEntry.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index 43fcba0d..8545b508 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -347,6 +347,12 @@ public class EntityTrackerEntry {
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(0, this.tracker, this.tracker.vehicle));
}
+ // CraftBukkit start
+ if (this.tracker.passenger != null) {
+ entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(0, this.tracker.passenger, this.tracker));
+ }
+ // CraftBukkit end
+
if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bI() != null) {
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bI()));
}