Added command to show missing recipes, closes #485
This commit is contained in:
parent
f39a047f49
commit
f7ff3f87a9
2 changed files with 11 additions and 3 deletions
|
@ -63,8 +63,8 @@ public class Core
|
||||||
public static Core INSTANCE;
|
public static Core INSTANCE;
|
||||||
public static LogHelper logHelper = new LogHelper(new ModInfo());
|
public static LogHelper logHelper = new LogHelper(new ModInfo());
|
||||||
public static TechRebornWorldGen worldGen;
|
public static TechRebornWorldGen worldGen;
|
||||||
private static RecipeCompact recipeCompact;
|
public static RecipeCompact recipeCompact;
|
||||||
private static File configDir;
|
public static File configDir;
|
||||||
public VersionChecker versionChecker;
|
public VersionChecker versionChecker;
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
|
|
|
@ -20,7 +20,9 @@ import net.minecraftforge.fml.common.registry.GameData;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
import reborncore.api.fuel.FluidPowerManager;
|
import reborncore.api.fuel.FluidPowerManager;
|
||||||
import reborncore.api.recipe.RecipeHandler;
|
import reborncore.api.recipe.RecipeHandler;
|
||||||
|
import techreborn.Core;
|
||||||
import techreborn.dev.JsonGenerator;
|
import techreborn.dev.JsonGenerator;
|
||||||
|
import techreborn.init.RecipeCompact;
|
||||||
|
|
||||||
public class TechRebornDevCommand extends CommandBase
|
public class TechRebornDevCommand extends CommandBase
|
||||||
{
|
{
|
||||||
|
@ -98,13 +100,19 @@ public class TechRebornDevCommand extends CommandBase
|
||||||
} else {
|
} else {
|
||||||
((EntityPlayer) sender).addChatComponentMessage(new TextComponentString("hold an item!"));
|
((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 {
|
try {
|
||||||
new JsonGenerator().generate();
|
new JsonGenerator().generate();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
sender.addChatMessage(new TextComponentString(e.getLocalizedMessage()));
|
sender.addChatMessage(new TextComponentString(e.getLocalizedMessage()));
|
||||||
}
|
}
|
||||||
|
} else if ("missing".equals(args[0])) {
|
||||||
|
try {
|
||||||
|
Core.recipeCompact.saveMissingItems(Core.configDir);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue