mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 12:15:53 +01:00
Attempted fix for /npc tphere - make NPCs tracked over a longer range than previously
This commit is contained in:
parent
c2467b7a25
commit
a044eed988
@ -67,7 +67,7 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker {
|
||||
return; // prevent updates to NPC "viewers"
|
||||
Entity tracker = getTracker(this);
|
||||
final Vec3D vec3d = new Vec3D(entityplayer.locX, entityplayer.locY, entityplayer.locZ).d(this.trackerEntry.b());
|
||||
final int i = Math.min(this.trackingDistance, (getViewDistance(map) - 1) * 16);
|
||||
final int i = Math.max(this.trackingDistance, (getViewDistance(map) - 1) * 16);
|
||||
final boolean flag = vec3d.x >= -i && vec3d.x <= i && vec3d.z >= -i && vec3d.z <= i
|
||||
&& this.tracker.a(entityplayer);
|
||||
if (entityplayer != tracker && flag && tracker instanceof SkinnableEntity) {
|
||||
|
@ -68,7 +68,7 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker {
|
||||
Entity tracker = getTracker(this);
|
||||
final Vec3D vec3d = new Vec3D(entityplayer.locX(), entityplayer.locY(), entityplayer.locZ())
|
||||
.d(this.trackerEntry.b());
|
||||
final int i = Math.min(this.trackingDistance, (getViewDistance(map) - 1) * 16);
|
||||
final int i = Math.max(this.trackingDistance, (getViewDistance(map) - 1) * 16);
|
||||
final boolean flag = vec3d.x >= -i && vec3d.x <= i && vec3d.z >= -i && vec3d.z <= i
|
||||
&& this.tracker.a(entityplayer);
|
||||
if (entityplayer != tracker && flag && tracker instanceof SkinnableEntity) {
|
||||
@ -80,7 +80,8 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker {
|
||||
flag1 = getb(chunkcoordintpair, entityplayer, false) <= getViewDistance(map);
|
||||
}
|
||||
}*/
|
||||
if (!this.trackedPlayers.contains(entityplayer)) {
|
||||
|
||||
if (!this.trackedPlayers.contains(entityplayer) || true) {
|
||||
SkinnableEntity skinnable = (SkinnableEntity) tracker;
|
||||
|
||||
Player player = skinnable.getBukkitEntity();
|
||||
|
Loading…
Reference in New Issue
Block a user