Don't measure distance between worlds

This commit is contained in:
fullwall 2020-11-03 14:36:44 +08:00
parent 55922168d2
commit 10e1576496

View File

@ -142,7 +142,8 @@ public class HologramTrait extends Trait {
nameNPC = createHologram(npc.getFullName(), 0);
}
}
boolean update = currentLoc.distanceSquared(npc.getStoredLocation()) >= 0.01;
boolean update = currentLoc.getWorld() != npc.getStoredLocation().getWorld()
|| currentLoc.distanceSquared(npc.getStoredLocation()) >= 0.01;
if (update) {
currentLoc = npc.getStoredLocation();
}