aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/misc/GT_Command.java
diff options
context:
space:
mode:
authorGlodBlock <60341015+GlodBlock@users.noreply.github.com>2021-09-27 15:39:31 +0800
committerGitHub <noreply@github.com>2021-09-27 15:39:31 +0800
commit097438be70486735a8940dd5ce4e9484b6d951af (patch)
tree90f26b34d5059eb9858d9c82aabbd5373638acfa /src/main/java/gregtech/common/misc/GT_Command.java
parenta0a77f0b9868a4ca8a3df8ae8d50b4dcfb4030db (diff)
parent92433a5b85bb2fcca541ac25ca4033fac24f841e (diff)
downloadGT5-Unofficial-097438be70486735a8940dd5ce4e9484b6d951af.tar.gz
GT5-Unofficial-097438be70486735a8940dd5ce4e9484b6d951af.tar.bz2
GT5-Unofficial-097438be70486735a8940dd5ce4e9484b6d951af.zip
Merge pull request #1 from GlodBlock/fix-crack-recipe-check
Fix crack recipe check
Diffstat (limited to 'src/main/java/gregtech/common/misc/GT_Command.java')
-rw-r--r--src/main/java/gregtech/common/misc/GT_Command.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java
index f3272ee341..13e26353d8 100644
--- a/src/main/java/gregtech/common/misc/GT_Command.java
+++ b/src/main/java/gregtech/common/misc/GT_Command.java
@@ -1,12 +1,12 @@
package gregtech.common.misc;
+import com.gtnewhorizon.structurelib.StructureLib;
import gregtech.GT_Mod;
import gregtech.api.enums.GT_Values;
import gregtech.api.objects.GT_ChunkManager;
import gregtech.common.GT_Pollution;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
-import net.minecraft.command.WrongUsageException;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChunkCoordinates;
@@ -41,6 +41,7 @@ public final class GT_Command extends CommandBase {
sender.addChatMessage(new ChatComponentText("\"toggle debugSmallOres\" - toggles worldgen small vein debug"));
sender.addChatMessage(new ChatComponentText("\"toggle debugStones\" - toggles worldgen stones debug"));
sender.addChatMessage(new ChatComponentText("\"toggle debugChunkloaders\" - toggles chunkloaders debug"));
+ sender.addChatMessage(new ChatComponentText("\"toggle debugMulti\" - toggles structurelib debug"));
sender.addChatMessage(new ChatComponentText("\"chunks\" - print a list of the force loaded chunks"));
sender.addChatMessage(new ChatComponentText(
"\"pollution <amount>\" - adds the <amount> of the pollution to the current chunk, " +
@@ -60,7 +61,7 @@ public final class GT_Command extends CommandBase {
} else if (test.equals("toggle")) {
String test1 = ss[1].trim();
Stream.of("D1", "D2", "debugCleanroom", "debugDriller", "debugBlockPump", "debugBlockMiner", "debugWorldGen", "debugEntityCramming",
- "debugOrevein", "debugSmallOres", "debugStones", "debugChunkloaders")
+ "debugOrevein", "debugSmallOres", "debugStones", "debugChunkloaders", "debugMulti")
.filter(s -> test1.isEmpty() || s.startsWith(test1))
.forEach(l::add);
@@ -80,6 +81,11 @@ public final class GT_Command extends CommandBase {
printHelp(sender);
return;
}
+ if ("debugMulti".equals(strings[1])) {
+ StructureLib.DEBUG_MODE = !StructureLib.DEBUG_MODE;
+ sender.addChatMessage(new ChatComponentText(strings[1] + " = " + (StructureLib.DEBUG_MODE ? "true" : "false")));
+ return;
+ }
try {
Field field = GT_Values.class.getDeclaredField(strings[1]);
if (field.getType() != boolean.class) {