diff options
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java | 22 | ||||
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java | 5 |
2 files changed, 23 insertions, 4 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java index 95d7367c..a12bb9af 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java @@ -190,6 +190,28 @@ public class CommandDgDebug extends CommandBase { case "gimmebright": Minecraft.getMinecraft().gameSettings.setOptionFloatValue(GameSettings.Options.GAMMA, 1000); break; + case "pfall": + try { + DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext(); + EntityPlayerSP thePlayer = Minecraft.getMinecraft().thePlayer; + if (thePlayer == null) { + return; + } + if (context.getBossfightProcessor() != null) { + context.getBossfightProcessor().tick(); + } + Point roomPt = context.getScaffoldParser().getDungeonMapLayout().worldPointToRoomPoint(thePlayer.getPosition()); + + DungeonRoom dungeonRoom = context.getScaffoldParser().getRoomMap().get(roomPt); + GeneralRoomProcessor grp = (GeneralRoomProcessor) dungeonRoom.getRoomProcessor(); + // performance testing (lol) + for (String s : dungeonRoom.getMechanics().keySet()) { + grp.pathfind("COMMAND-"+s, s, "navigate", FeatureRegistry.SECRET_LINE_PROPERTIES_GLOBAL.getRouteProperties()); + } + } catch (Throwable t) { + t.printStackTrace(); + } + break; default: ChatTransmitter.addToQueue(new ChatComponentText("ain't gonna find much anything here")); ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §e/dg loadrooms §7-§f Reloads dungeon roomdata.")); diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java index 49dd6d58..406170ec 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java @@ -82,10 +82,7 @@ public class FeaturePathfindStrategy extends SimpleFeature { public enum PathfindStrategy { THETA_STAR("The default pathfinding algorithm. It will generate sub-optimal path quickly."), A_STAR_DIAGONAL("New pathfinding algorithm. It will generate path that looks like the one JPS generates"), - A_STAR_FINE_GRID("New pathfinding algorithm. It will generate path that kind of looks like stair"), - JPS_LEGACY("The improved pathfinding algorithm. Not suggested for usage. It will have problems on diagonal movements, thus giving wrong routes"), - A_STAR_LEGACY("The first pathfinding algorithm. It may have problem on navigating through stairs. This is the one used by Minecraft for mob pathfind."); - + A_STAR_FINE_GRID("New pathfinding algorithm. It will generate path that kind of looks like stair"); private final String description; } |