use of crafttweaker.mc1120.recipes.MCRecipeManager in project CraftTweaker by CraftTweaker.
the class CraftTweaker method onConstruction.
@EventHandler
public void onConstruction(FMLConstructionEvent event) {
CrafttweakerImplementationAPI.init(new MCOreDict(), recipes = new MCRecipeManager(), new MCFurnaceManager(), MCGame.INSTANCE, new MCLoadedMods(), new MCFormatter(), new MCVanilla(), new MCItemUtils(), new MCBrewing());
CrafttweakerImplementationAPI.logger.addLogger(new MCLogger(new File("crafttweaker.log")));
CrafttweakerImplementationAPI.platform = MCPlatformFunctions.INSTANCE;
File globalDir = new File("scripts");
if (!globalDir.exists())
globalDir.mkdirs();
scriptsGlobal = new ScriptProviderDirectory(globalDir);
CrafttweakerImplementationAPI.setScriptProvider(scriptsGlobal);
if (event.getSide().isServer()) {
CraftTweakerAPI.tweaker.setNetworkSide(NetworkSide.SIDE_SERVER);
} else {
CraftTweakerAPI.tweaker.setNetworkSide(NetworkSide.SIDE_CLIENT);
}
// register the modloaded preprocessor which can't be in the API package as it needs access to MC
CraftTweakerAPI.tweaker.getPreprocessorManager().registerPreprocessorAction("modloaded", ModLoadedPreprocessor::new);
}
Aggregations