diff options
| author | CraftyOldMiner <85420839+CraftyOldMiner@users.noreply.github.com> | 2022-03-24 14:55:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-24 19:55:20 +0000 |
| commit | e202e4adf979073921455083f5e737bc4fcf5f14 (patch) | |
| tree | 5e1653b8696168294f2b3456d532e88d4a73fc73 /src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java | |
| parent | 7d923e6675dc681261e3cbd5fb0c81263209dbc6 (diff) | |
| download | notenoughupdates-e202e4adf979073921455083f5e737bc4fcf5f14.tar.gz notenoughupdates-e202e4adf979073921455083f5e737bc4fcf5f14.tar.bz2 notenoughupdates-e202e4adf979073921455083f5e737bc4fcf5f14.zip | |
Refactor Hollows solvers, add tests, add Vec3Comparable, fix bugs (#95)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java index 88264538..dab99698 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DiagCommand.java @@ -17,8 +17,10 @@ public class DiagCommand extends ClientCommandBase { private static final String USAGE_TEXT = EnumChatFormatting.WHITE + "Usage: /neudiag <metal | wishing | debug>\n\n" + - "/neudiag metal Metal Detector Solver diagnostics\n" + - "/neudiag wishing Wishing Compass Solver diagnostics\n" + + "/neudiag metal Metal Detector Solver diagnostics\n" + + " <no sub-command> Show current solution diags\n" + + " center=<off | on> Disable / enable using center\n" + + "/neudiag wishing Wishing Compass Solver diagnostics\n" + "/neudiag debug\n" + " <no sub-command> Show current flags\n" + " <enable | disable> <flag> Enable/disable flag\n"; @@ -37,7 +39,26 @@ public class DiagCommand extends ClientCommandBase { String command = args[0].toLowerCase(); switch (command) { case "metal": - CrystalMetalDetectorSolver.logDiagnosticData(true); + if (args.length == 1) { + CrystalMetalDetectorSolver.logDiagnosticData(true); + return; + } + + String subCommand = args[1].toLowerCase(); + if (subCommand.equals("center=off")) { + CrystalMetalDetectorSolver.setDebugDoNotUseCenter(true); + sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + + "Center coordinates-based solutions disabled")); + } + else if (subCommand.equals("center=on")) { + CrystalMetalDetectorSolver.setDebugDoNotUseCenter(false); + sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + + "Center coordinates-based solutions enabled")); + } else { + showUsage(sender); + return; + } + break; case "wishing": CrystalWishingCompassSolver.getInstance().logDiagnosticData(true); |
