From 6ace9742d83fec9e52d512b7ed9dfe24dd47306f Mon Sep 17 00:00:00 2001 From: Fryslan Date: Tue, 3 Feb 2015 16:01:30 +0100 Subject: [PATCH] Added Methods + Java Docs Added #walkTo(Tile to) walks from player to destination Tile. Added Java Docs --- src/org/rev317/min/api/methods/Walking.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/org/rev317/min/api/methods/Walking.java b/src/org/rev317/min/api/methods/Walking.java index 1c95e69..5acbcca 100644 --- a/src/org/rev317/min/api/methods/Walking.java +++ b/src/org/rev317/min/api/methods/Walking.java @@ -12,16 +12,24 @@ public class Walking { /** * Walks from tile to tile * - * @param from - * @param to + * @param from Tile to Walk From. + * @param to Tile to Walk To. */ public static void walkTo(Tile from, Tile to) { Loader.getClient().walkTo(0, 0, 0, 0, from.getRegionY(), 0, 0, to.getRegionY(), from.getRegionX(), true, to.getRegionX()); } /** - * @param tilePath + * Walks from the Player's Location to tile. * + * @param to Destination Tile. + */ + public static void walkTo(Tile to) { + Loader.getClient().walkTo(0, 0, 0, 0, Players.getMyPlayer().getLocation().getRegionY(), 0, 0, to.getRegionY(), Players.getMyPlayer().getLocation().getRegionX(), true, to.getRegionX()); + } + + /** + * @param tilePath * @return true if destination reached, otherwise false */ public static boolean walkDown(TilePath tilePath) { @@ -36,7 +44,6 @@ public class Walking { * Gets nearest reachable tile on minimap to given tile * * @param tile - * * @return nearest reachable tile on minimap */ public static Tile getNearestTileTo(Tile tile) {