diff options
author | syeyoung <cyoung06@naver.com> | 2023-02-11 19:45:52 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-02-11 19:45:52 +0900 |
commit | 85fa716c4f000f2e0b50c6c5f4449d4033b87f97 (patch) | |
tree | b21eb12387a127078c827cc7333db47eaf03b77a /mod/src | |
parent | f1969e6e75c99066173ac613d5e9004d04205889 (diff) | |
download | Skyblock-Dungeons-Guide-85fa716c4f000f2e0b50c6c5f4449d4033b87f97.tar.gz Skyblock-Dungeons-Guide-85fa716c4f000f2e0b50c6c5f4449d4033b87f97.tar.bz2 Skyblock-Dungeons-Guide-85fa716c4f000f2e0b50c6c5f4449d4033b87f97.zip |
- Fix refresh line not working as intended
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src')
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); } |