Added command to show missing recipes, closes #485

This commit is contained in:
modmuss50 2016-05-25 17:30:06 +01:00
parent f39a047f49
commit f7ff3f87a9
2 changed files with 11 additions and 3 deletions

View file

@ -63,8 +63,8 @@ public class Core
public static Core INSTANCE;
public static LogHelper logHelper = new LogHelper(new ModInfo());
public static TechRebornWorldGen worldGen;
private static RecipeCompact recipeCompact;
private static File configDir;
public static RecipeCompact recipeCompact;
public static File configDir;
public VersionChecker versionChecker;
@Mod.EventHandler

View file

@ -20,7 +20,9 @@ import net.minecraftforge.fml.common.registry.GameData;
import net.minecraftforge.fml.common.registry.GameRegistry;
import reborncore.api.fuel.FluidPowerManager;
import reborncore.api.recipe.RecipeHandler;
import techreborn.Core;
import techreborn.dev.JsonGenerator;
import techreborn.init.RecipeCompact;
public class TechRebornDevCommand extends CommandBase
{
@ -98,13 +100,19 @@ public class TechRebornDevCommand extends CommandBase
} else {
((EntityPlayer) sender).addChatComponentMessage(new TextComponentString("hold an item!"));
}
} else if ("gen".equals(args[0])) { //TODO DO NOT SHIP!!!
} else if ("gen".equals(args[0])) {
try {
new JsonGenerator().generate();
} catch (IOException e) {
e.printStackTrace();
sender.addChatMessage(new TextComponentString(e.getLocalizedMessage()));
}
} else if ("missing".equals(args[0])) {
try {
Core.recipeCompact.saveMissingItems(Core.configDir);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}