From 11400b909df71665dcb601518bdb6d1ebd6b841a Mon Sep 17 00:00:00 2001 From: fullwall Date: Fri, 15 Jan 2016 15:19:25 +0800 Subject: [PATCH] Set distance margin as block squared directly to reduce confusion, fix incorrect quotes in messages --- .../java/net/citizensnpcs/commands/NPCCommands.java | 2 +- src/main/resources/messages_en.properties | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/citizensnpcs/commands/NPCCommands.java b/src/main/java/net/citizensnpcs/commands/NPCCommands.java index af541b8c4..74c15873c 100644 --- a/src/main/java/net/citizensnpcs/commands/NPCCommands.java +++ b/src/main/java/net/citizensnpcs/commands/NPCCommands.java @@ -1001,7 +1001,7 @@ public class NPCCommands { double distance = Double.parseDouble(args.getFlag("distance-margin")); if (distance < 0) throw new CommandException(); - npc.getNavigator().getDefaultParameters().distanceMargin(distance); + npc.getNavigator().getDefaultParameters().distanceMargin(Math.pow(distance, 2)); Messaging.sendTr(sender, Messages.PATHFINDING_OPTIONS_DISTANCE_MARGIN_SET, npc.getName(), distance); found = true; } diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 6642b8e28..0b277c2bd 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -74,9 +74,9 @@ citizens.commands.npc.passive.unset=[[{0}]] will now damage entities. citizens.commands.npc.pathfindingrange.set=Pathfinding range set to [[{0}]]. citizens.commands.npc.pathopt.avoid-water-set=[[{0}]] will now avoid water. citizens.commands.npc.pathopt.avoid-water-unset=[[{0}]] will no longer avoid water. -citizens.commands.npc.pathopt.stationary-ticks-set=[[{0}]]'s maximum stationary ticks set to [[{1}]]. -citizens.commands.npc.pathopt.distance-margin-set=[[{0}]]'s pathfinding distance margin set to [[{1}]]. -citizens.commands.npc.pathopt.attack-range-set=[[{0}]]'s attack range set to [[{1}]]. +citizens.commands.npc.pathopt.stationary-ticks-set=[[{0}]]''s maximum stationary ticks set to [[{1}]]. +citizens.commands.npc.pathopt.distance-margin-set=[[{0}]]''s pathfinding distance margin set to [[{1}]]. +citizens.commands.npc.pathopt.attack-range-set=[[{0}]]''s attack range set to [[{1}]]. citizens.commands.npc.playerlist.added=Added [[{0}]] to the player list. citizens.commands.npc.playerlist.removed=Removed [[{0}]] from the player list. citizens.commands.npc.pose.added=Pose added. @@ -119,7 +119,7 @@ citizens.commands.npc.swim.unset=[[{0}]] will no longer swim in water. citizens.commands.npc.targetable.set=[[{0}]] can now be targeted by mobs. citizens.commands.npc.targetable.unset=[[{0}]] can no longer be targeted by mobs. citizens.commands.npc.tp.teleported=You teleported to [[{0}]]. -citizens.commands.npc.tp.location-not-found=Couldn't find the target NPC's location. +citizens.commands.npc.tp.location-not-found=Couldn''t find the target NPC''s location. citizens.commands.npc.tpto.success=Teleported successfully. citizens.commands.npc.tpto.to-not-found=Destination entity not found. citizens.commands.npc.tpto.from-not-found=Source entity not found. @@ -129,7 +129,7 @@ citizens.commands.npc.type.invalid=[[{0}]] is not a valid type. citizens.commands.npc.vulnerable.set=[[{0}]] is now vulnerable. citizens.commands.npc.vulnerable.stopped=[[{0}]] is no longer vulnerable. citizens.commands.npc.wolf.unknown-collar-color=[[{0}]] is not an RGB-formatted collar color or the name of a DyeColor. -citizens.commands.npc.wolf.collar-color-unsupported=[[{0}]] is not a RGB color code that can be used on a wolf's collar. +citizens.commands.npc.wolf.collar-color-unsupported=[[{0}]] is not a RGB color code that can be used on a wolf''s collar. citizens.commands.npc.zombiemod.villager-set=[[{0}]] is now a villager. citizens.commands.npc.zombiemod.villager-unset=[[{0}]] is no longer a villager. citizens.commands.npc.zombiemod.baby-set=[[{0}]] is now a baby. @@ -182,7 +182,7 @@ citizens.editors.equipment.sheep-coloured=[[{0}]] is now coloured [[{1}]]. citizens.editors.selection.start-prompt=There were multiple NPCs with the supplied name.
Please enter an id or number from the list below to select that NPC. citizens.editors.text.add-prompt=Enter text to add to the NPC. citizens.editors.text.added-entry=[[Added]] the entry [[{0}]]. -citizens.editors.text.begin=Entered the text editor! Type 'exit' to leave the editor. +citizens.editors.text.begin=Entered the text editor! Type ''exit'' to leave the editor. citizens.editors.text.change-page-prompt=Enter a page number to view more text entries. citizens.editors.text.close-talker-set=[[Close talker]] set to [[{0}]]. citizens.editors.text.edit-begin-prompt=Enter the index of the entry you wish to edit or [[page]] to view more pages.