aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2023-01-25 21:02:37 +0900
committersyeyoung <cyoung06@naver.com>2023-01-25 21:02:37 +0900
commit981ad3229a44cb0b937a26738f28fdfb9bf2735a (patch)
tree840fcbb7c0a867adff1f1c9368173ecfb43d19d2
parent9361d8cbaf4c60cf1fd81118e9b299d94c04dbf8 (diff)
downloadSkyblock-Dungeons-Guide-981ad3229a44cb0b937a26738f28fdfb9bf2735a.tar.gz
Skyblock-Dungeons-Guide-981ad3229a44cb0b937a26738f28fdfb9bf2735a.tar.bz2
Skyblock-Dungeons-Guide-981ad3229a44cb0b937a26738f28fdfb9bf2735a.zip
- limit options
- very cool command to measure your pc performance Signed-off-by: syeyoung <cyoung06@naver.com>
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java22
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java5
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;
}