From da5d494b3665f51651ee4f3c31d9f9d6f4a24b47 Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Sat, 3 Aug 2013 17:03:49 -0500 Subject: [PATCH] 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. --- src/main/java/net/minecraft/server/EntityTrackerEntry.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java index 43fcba0d7f..8545b50846 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())); }