mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-22 05:12:20 +00:00
Added command to print Botania recipes
This commit is contained in:
1 parent
a0a8f2f26e
commit
0b18e5c12e
6 files changed
+149
-58
No files matched your search
@@ -1,15 +1,15 @@
|
||||
package modtweaker2.mods.appeng.commands;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.Arrays;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.MineTweakerImplementationAPI;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import minetweaker.api.server.ICommandFunction;
|
||||
import modtweaker2.helpers.InputHelper;
|
||||
import modtweaker2.helpers.LogHelper;
|
||||
import modtweaker2.helpers.StringHelper;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.features.IGrinderEntry;
|
||||
import appeng.api.features.IInscriberRecipe;
|
||||
@@ -25,10 +25,10 @@ public class AppliedEnergisticsLogger implements ICommandFunction {
|
||||
|
||||
@Override
|
||||
public void execute(String[] arguments, IPlayer player) {
|
||||
List<String> args = LogHelper.toLowerCase(Arrays.asList(arguments));
|
||||
List<String> args = StringHelper.toLowerCase(Arrays.asList(arguments));
|
||||
|
||||
if(!validArguments.containsAll(args)) {
|
||||
player.sendChat(MineTweakerImplementationAPI.platform.getMessage("Invalid arguments for command. Valid arguments: " + LogHelper.join(validArguments, ", ")));
|
||||
player.sendChat(MineTweakerImplementationAPI.platform.getMessage("Invalid arguments for command. Valid arguments: " + StringHelper.join(validArguments, ", ")));
|
||||
} else {
|
||||
if(args.isEmpty() || args.contains("grinder")) {
|
||||
for(IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes()) {
|
||||
@@ -46,7 +46,7 @@ public class AppliedEnergisticsLogger implements ICommandFunction {
|
||||
if(args.isEmpty() || args.contains("inscriber")) {
|
||||
for(IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes()) {
|
||||
MineTweakerAPI.logCommand(String.format("mods.appeng.Inscriber.addRecipe(%s, %s, %s, %s, \"%s\");",
|
||||
LogHelper.getArrayDescription(recipe.getInputs()),
|
||||
InputHelper.getArrayDescription(recipe.getInputs()),
|
||||
InputHelper.getStackDescription(recipe.getTopOptional().orNull()),
|
||||
InputHelper.getStackDescription(recipe.getBottomOptional().orNull()),
|
||||
InputHelper.getStackDescription(recipe.getOutput()),
|
||||
|
||||
Reference in new issue
Block a user