Fix entity tracking when the player is the vehicle
Fixes GH-378
Dieser Commit ist enthalten in:
Ursprung
2763f8fe5e
Commit
af70722300
@ -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>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 17 Jun 2013 01:24:00 -0400
|
Date: Mon, 17 Jun 2013 01:24:00 -0400
|
||||||
Subject: [PATCH] Entity Tracking Improvements
|
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.
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/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 {
|
@@ -51,6 +51,7 @@ public abstract class Entity implements ICommandListener {
|
||||||
@ -19,7 +19,7 @@ index c3efc7f..797e078 100644
|
|||||||
if (bukkitEntity == null) {
|
if (bukkitEntity == null) {
|
||||||
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||||
@@ -49,6 +49,7 @@ public class EntityTrackerEntry {
|
@@ -49,6 +49,7 @@ public class EntityTrackerEntry {
|
||||||
@ -73,7 +73,7 @@ index f505e3c..b97769f 100644
|
|||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ private static boolean isTrackedBy(Entity entity, EntityPlayer entityplayer) {
|
+ 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) {
|
+ private void updatePassengers(EntityPlayer player) {
|
||||||
+ if (tracker.isVehicle()) {
|
+ if (tracker.isVehicle()) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren