From 56eb239685db7c8a604eed91cf578e192d8cd67b Mon Sep 17 00:00:00 2001 From: Rseifert Date: Fri, 1 Mar 2013 12:44:49 -0500 Subject: [PATCH] .. --- src/minecraft/hydraulic/core/path/Pathfinder.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/minecraft/hydraulic/core/path/Pathfinder.java b/src/minecraft/hydraulic/core/path/Pathfinder.java index b7014f801..1120a1ca2 100644 --- a/src/minecraft/hydraulic/core/path/Pathfinder.java +++ b/src/minecraft/hydraulic/core/path/Pathfinder.java @@ -33,7 +33,7 @@ public class Pathfinder public List results; public World world; - + public Pathfinder(World world, List blockIDs) { this.blockIDs = blockIDs; @@ -60,15 +60,11 @@ public class Pathfinder ForgeDirection dir = ForgeDirection.getOrientation(i); Vector3 dirLoc = new Vector3(location.intX() + dir.offsetX, location.intY() + dir.offsetY, location.intZ() + dir.offsetZ); - if (!searchedNodes.contains(dirLoc)) + if (!searchedNodes.contains(dirLoc) && this.isValidNode(dir, dirLoc)) { - if (this.isValidNode(dir, dirLoc)) + if (!this.findNodes(dirLoc)) { - if (!this.findNodes(dirLoc)) - { - return false; - } - + return false; } } } @@ -109,8 +105,8 @@ public class Pathfinder */ public Pathfinder init(Vector3 start, Vector3 target) { - this.findNodes(start); this.target = target; + this.findNodes(start); return this; }