diff --git a/src/main/java/mekanism/common/integration/crafttweaker/CrafttweakerIntegration.java b/src/main/java/mekanism/common/integration/crafttweaker/CrafttweakerIntegration.java index d2da22356..3413c14d2 100644 --- a/src/main/java/mekanism/common/integration/crafttweaker/CrafttweakerIntegration.java +++ b/src/main/java/mekanism/common/integration/crafttweaker/CrafttweakerIntegration.java @@ -6,7 +6,8 @@ import crafttweaker.mc1120.commands.CTChatCommand; import java.util.LinkedList; import java.util.List; import mekanism.common.Mekanism; -import mekanism.common.integration.crafttweaker.gas.GasesCommand; +import mekanism.common.integration.crafttweaker.commands.GasesCommand; +import mekanism.common.integration.crafttweaker.commands.InfuseTypesCommand; public class CrafttweakerIntegration { @@ -39,5 +40,6 @@ public class CrafttweakerIntegration { public static void registerCommands() { CTChatCommand.registerCommand(new GasesCommand()); + CTChatCommand.registerCommand(new InfuseTypesCommand()); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/integration/crafttweaker/gas/GasesCommand.java b/src/main/java/mekanism/common/integration/crafttweaker/commands/GasesCommand.java similarity index 60% rename from src/main/java/mekanism/common/integration/crafttweaker/gas/GasesCommand.java rename to src/main/java/mekanism/common/integration/crafttweaker/commands/GasesCommand.java index 5e402c004..0aa6bbaca 100644 --- a/src/main/java/mekanism/common/integration/crafttweaker/gas/GasesCommand.java +++ b/src/main/java/mekanism/common/integration/crafttweaker/commands/GasesCommand.java @@ -1,11 +1,8 @@ -package mekanism.common.integration.crafttweaker.gas; - -import static crafttweaker.mc1120.commands.SpecialMessagesChat.getClickableCommandText; -import static crafttweaker.mc1120.commands.SpecialMessagesChat.getLinkToCraftTweakerLog; -import static crafttweaker.mc1120.commands.SpecialMessagesChat.getNormalMessage; +package mekanism.common.integration.crafttweaker.commands; import crafttweaker.CraftTweakerAPI; import crafttweaker.mc1120.commands.CraftTweakerCommand; +import crafttweaker.mc1120.commands.SpecialMessagesChat; import java.util.List; import mekanism.api.gas.Gas; import mekanism.api.gas.GasRegistry; @@ -21,8 +18,8 @@ public class GasesCommand extends CraftTweakerCommand { @Override protected void init() { - setDescription(getClickableCommandText(TextFormatting.DARK_GREEN + "/ct " + subCommandName, - "/ct " + subCommandName, true), getNormalMessage(TextFormatting.DARK_AQUA + + setDescription(SpecialMessagesChat.getClickableCommandText(TextFormatting.DARK_GREEN + "/ct " + subCommandName, + "/ct " + subCommandName, true), SpecialMessagesChat.getNormalMessage(TextFormatting.DARK_AQUA + "Outputs a list of all registered gases to the crafttweaker.log")); } @@ -32,6 +29,7 @@ public class GasesCommand extends CraftTweakerCommand { List gases = GasRegistry.getRegisteredGasses(); gases.forEach( gas -> CraftTweakerAPI.logCommand(String.format(", %s", gas.getName(), gas.getLocalizedName()))); - sender.sendMessage(getLinkToCraftTweakerLog("List of " + gases.size() + " gases generated;", sender)); + sender.sendMessage(SpecialMessagesChat.getLinkToCraftTweakerLog( + "List of " + gases.size() + " gases generated;", sender)); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/integration/crafttweaker/commands/InfuseTypesCommand.java b/src/main/java/mekanism/common/integration/crafttweaker/commands/InfuseTypesCommand.java new file mode 100644 index 000000000..119b6af14 --- /dev/null +++ b/src/main/java/mekanism/common/integration/crafttweaker/commands/InfuseTypesCommand.java @@ -0,0 +1,33 @@ +package mekanism.common.integration.crafttweaker.commands; + +import crafttweaker.CraftTweakerAPI; +import crafttweaker.mc1120.commands.CraftTweakerCommand; +import crafttweaker.mc1120.commands.SpecialMessagesChat; +import java.util.Set; +import mekanism.api.infuse.InfuseRegistry; +import net.minecraft.command.ICommandSender; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.text.TextFormatting; + +public class InfuseTypesCommand extends CraftTweakerCommand { + + public InfuseTypesCommand() { + super("infuseTypes"); + } + + @Override + protected void init() { + setDescription(SpecialMessagesChat.getClickableCommandText(TextFormatting.DARK_GREEN + "/ct " + subCommandName, + "/ct " + subCommandName, true), SpecialMessagesChat.getNormalMessage(TextFormatting.DARK_AQUA + + "Outputs a list of all registered metallurgic infuser infusion types to the crafttweaker.log")); + } + + @Override + public void executeCommand(MinecraftServer server, ICommandSender sender, String[] args) { + CraftTweakerAPI.logCommand("Infuse Types:"); + Set names = InfuseRegistry.getInfuseMap().keySet(); + names.forEach(CraftTweakerAPI::logCommand); + sender.sendMessage(SpecialMessagesChat.getLinkToCraftTweakerLog("List of " + names.size() + + " metallurgic infuser infusion types generated;", sender)); + } +} \ No newline at end of file