aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java7
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java7
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java23
3 files changed, 16 insertions, 21 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java
index dc0854c5..d486d220 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMove.java
@@ -95,12 +95,9 @@ public class ActionMove extends AbstractAction {
}
}
- if (tick == 0 && actionRouteProperties.isPathfind()) {
- try {
- if (latestFuture != null) latestFuture.cancel(true);
- } catch (Exception ignored) {}
+ if (tick == 0 && actionRouteProperties.isPathfind() && latestFuture == null) {
if (!FeatureRegistry.SECRET_FREEZE_LINES.isEnabled() || poses == null)
- latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, actionRouteProperties.getLineRefreshRate()* 50- 10);
+ latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, 10000);
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
index 11aecad1..85343568 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionMoveNearestAir.java
@@ -93,12 +93,9 @@ public class ActionMoveNearestAir extends AbstractAction {
}
}
- if (tick == 0 && actionRouteProperties.isPathfind()) {
- try {
- if (latestFuture != null) latestFuture.cancel(true);
- } catch (Exception ignored) {}
+ if (tick == 0 && actionRouteProperties.isPathfind() && latestFuture == null) {
if (!FeatureRegistry.SECRET_FREEZE_LINES.isEnabled() || poses == null)
- latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, actionRouteProperties.getLineRefreshRate()* 50- 10);
+ latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, 10000);
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
index 33388023..22daf0f2 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java
@@ -339,17 +339,18 @@ public class GeneralRoomProcessor implements RoomProcessor {
searchForNextTarget();
} else if (FeatureRegistry.SECRET_CREATE_REFRESH_LINE.getKeybind() == keyInputEvent.getKey() && FeatureRegistry.SECRET_CREATE_REFRESH_LINE.isEnabled()) {
ActionRoute actionRoute = getBestFit(0);
- if (actionRoute.getCurrentAction() instanceof ActionMove) {
- ActionMove ac = (ActionMove) actionRoute.getCurrentAction();
- ac.forceRefresh(getDungeonRoom());
- } else if (actionRoute.getCurrentAction() instanceof ActionMoveNearestAir) {
- ActionMoveNearestAir ac = (ActionMoveNearestAir) actionRoute.getCurrentAction();
- ac.forceRefresh(getDungeonRoom());
- } else if (actionRoute.getCurrent() >= 1 && actionRoute.getActions().get(actionRoute.getCurrent()-1) instanceof ActionMove) {
- ((ActionMove)actionRoute.getActions().get(actionRoute.getCurrent()-1)).forceRefresh(dungeonRoom);
- } else if (actionRoute.getCurrent() >= 1 && actionRoute.getActions().get(actionRoute.getCurrent()-1) instanceof ActionMoveNearestAir) {
- ((ActionMoveNearestAir)actionRoute.getActions().get(actionRoute.getCurrent()-1)).forceRefresh(dungeonRoom);
- }
+ // disable force refresh. It's bad idea.
+// if (actionRoute.getCurrentAction() instanceof ActionMove) {
+// ActionMove ac = (ActionMove) actionRoute.getCurrentAction();
+// ac.forceRefresh(getDungeonRoom());
+// } else if (actionRoute.getCurrentAction() instanceof ActionMoveNearestAir) {
+// ActionMoveNearestAir ac = (ActionMoveNearestAir) actionRoute.getCurrentAction();
+// ac.forceRefresh(getDungeonRoom());
+// } else if (actionRoute.getCurrent() >= 1 && actionRoute.getActions().get(actionRoute.getCurrent()-1) instanceof ActionMove) {
+// ((ActionMove)actionRoute.getActions().get(actionRoute.getCurrent()-1)).forceRefresh(dungeonRoom);
+// } else if (actionRoute.getCurrent() >= 1 && actionRoute.getActions().get(actionRoute.getCurrent()-1) instanceof ActionMoveNearestAir) {
+// ((ActionMoveNearestAir)actionRoute.getActions().get(actionRoute.getCurrent()-1)).forceRefresh(dungeonRoom);
+// }
if (FeatureRegistry.SECRET_CREATE_REFRESH_LINE.isPathfind() && !actionRoute.getActionRouteProperties().isPathfind()) {
actionRoute.getActionRouteProperties().setPathfind(true);