mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 16:18:02 +01:00
Fix entity tracking when the player is the vehicle
Fixes GH-378
This commit is contained in:
parent
2763f8fe5e
commit
af70722300
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
From 902f690e113947532f0c08031184f7fec14fa556 Mon Sep 17 00:00:00 2001
|
||||
From d603d2df6455409178a399ba768cdd684d3d8a1d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 17 Jun 2013 01:24:00 -0400
|
||||
Subject: [PATCH] Entity Tracking Improvements
|
||||
|
@ -7,7 +7,7 @@ If any part of a Vehicle/Passenger relationship is visible to a player,
|
|||
send all passenger/vehicles to the player in the chain.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index c3efc7f..797e078 100644
|
||||
index 4b2f804..4a7ca49 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -51,6 +51,7 @@ public abstract class Entity implements ICommandListener {
|
||||
|
@ -19,7 +19,7 @@ index c3efc7f..797e078 100644
|
|||
if (bukkitEntity == null) {
|
||||
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index f505e3c..b97769f 100644
|
||||
index f505e3c..c2113d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -49,6 +49,7 @@ public class EntityTrackerEntry {
|
||||
|
@ -73,7 +73,7 @@ index f505e3c..b97769f 100644
|
|||
+ return false;
|
||||
+ }
|
||||
+ private static boolean isTrackedBy(Entity entity, EntityPlayer entityplayer) {
|
||||
+ return entity.tracker != null && entity.tracker.trackedPlayers.contains(entityplayer);
|
||||
+ return entity == entityplayer || entity.tracker != null && entity.tracker.trackedPlayers.contains(entityplayer);
|
||||
+ }
|
||||
+ private void updatePassengers(EntityPlayer player) {
|
||||
+ if (tracker.isVehicle()) {
|
||||
|
|
Loading…
Reference in a new issue