diff options
3 files changed, 3 insertions, 2 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java index 56dd9ada..8f1fc2d1 100755 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java @@ -90,7 +90,7 @@ public class ActionMove extends AbstractAction { @Override public void onTick(DungeonRoom dungeonRoom, ActionRouteProperties actionRouteProperties) { tick = (tick+1) % Math.max(1, actionRouteProperties.getLineRefreshRate()); - if (executor == null) { + if (executor == null && actionRouteProperties.isPathfind()) { executor = dungeonRoom.createEntityPathTo(target.getBlockPos(dungeonRoom)); executor.setTarget(Minecraft.getMinecraft().thePlayer.getPositionVector()); } diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java index 27a356c6..dce9494a 100755 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java @@ -63,7 +63,7 @@ public class ActionMoveNearestAir extends AbstractAction { @Override public void onTick(DungeonRoom dungeonRoom, ActionRouteProperties actionRouteProperties) { tick = (tick+1) % Math.max(1, actionRouteProperties.getLineRefreshRate()); - if (executor == null) { + if (executor == null && actionRouteProperties.isPathfind()) { executor = dungeonRoom.createEntityPathTo(target.getBlockPos(dungeonRoom)); executor.setTarget(Minecraft.getMinecraft().thePlayer.getPositionVector()); } diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/algorithms/PathfinderExecutor.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/algorithms/PathfinderExecutor.java index 76c69cc5..8dcd499c 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/algorithms/PathfinderExecutor.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/algorithms/PathfinderExecutor.java @@ -42,6 +42,7 @@ public class PathfinderExecutor { this.pathfinder = pathfinder; this.target = target; this.dungeonRoom = dungeonRoom; + pathfinder.init(dungeonRoom, target); } |