diff --git a/main/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java b/main/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java index d47fe408f..c726973ce 100644 --- a/main/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java +++ b/main/src/main/java/net/citizensnpcs/npc/ai/MCNavigationStrategy.java @@ -72,10 +72,10 @@ public class MCNavigationStrategy extends AbstractPathStrategy { return true; boolean wasFinished = navigator.update(); parameters.run(); - handle.getLocation(HANDLE_LOCATION); - double dX = target.getBlockX() + 0.5 - HANDLE_LOCATION.getX(); - double dZ = target.getBlockZ() + 0.5 - HANDLE_LOCATION.getZ(); - double dY = target.getY() - HANDLE_LOCATION.getY(); + Location loc = handle.getLocation(HANDLE_LOCATION); + double dX = target.getBlockX() + 0.5 - loc.getX(); + double dZ = target.getBlockZ() + 0.5 - loc.getZ(); + double dY = target.getY() - loc.getY(); double xzDistance = dX * dX + dZ * dZ; if ((dY * dY) < 1 && xzDistance <= parameters.distanceMargin()) { stop(); diff --git a/main/src/main/resources/messages_en.properties b/main/src/main/resources/messages_en.properties index b75fbdbb3..de649d2ef 100644 --- a/main/src/main/resources/messages_en.properties +++ b/main/src/main/resources/messages_en.properties @@ -302,7 +302,7 @@ citizens.editors.text.delay-set=[[Delay]] set to [[{0}]] seconds. citizens.editors.text.realistic-looking-set=[[Realistic looking]] set to [[{0}]]. citizens.editors.text.remove-prompt=Enter the index of the entry you wish to remove or [[page]] to view more pages. citizens.editors.text.removed-entry=[[Removed]] entry at index [[{0}]]. -citizens.editors.text.start-prompt=Type [[add]] to add an entry, [[edit]] to edit entries, [[remove]] to remove entries, [[close]] to toggle the NPC as a close talker, [[item]] to set the item in hand pattern, [[range]] to set the talking range, [[delay]] to set the talking delay in seconds and [[random]] to toggle the NPC as a random talker. Type [[help]] to show this again. +citizens.editors.text.start-prompt=Type [[add]] to add an entry, [[edit]] to edit entries, [[remove]] to remove entries, [[close]] to toggle the NPC to send messages when players get close, [[item]] to set the talk item in hand pattern (set to [[default]] to clear), [[range]] to set the talking range, [[delay]] to set the talking delay in seconds and [[random]] to toggle the NPC as a random talker. Type [[help]] to show this again. citizens.editors.text.talk-item-set=[[Talk item pattern]] set to [[{0}]]. citizens.editors.waypoints.wander.range-set=Wander range set to xrange [[{0}]] and yrange [[{1}]]. citizens.editors.waypoints.wander.begin=Entered the wander waypoint editor.
Type [[xrange ]] or [[yrange ]] to modify the random wander range. Type [[regions]] to enter the region editor.
Type [[delay ]] to delay the NPC between wanders.