Search in sources :

Example 1 with TechRebornWorldGen

use of techreborn.world.TechRebornWorldGen in project TechReborn by TechReborn.

the class Core method preinit.

@Mod.EventHandler
public void preinit(FMLPreInitializationEvent event) throws IllegalAccessException, InstantiationException {
    event.getModMetadata().version = ModInfo.MOD_VERSION;
    INSTANCE = this;
    FMLCommonHandler.instance().bus().register(this);
    MinecraftForge.EVENT_BUS.register(this);
    configDir = new File(event.getModConfigurationDirectory(), "techreborn");
    if (!configDir.exists()) {
        configDir.mkdir();
    }
    config = ConfigTechReborn.initialize(new File(configDir, "main.cfg"));
    worldGen = new TechRebornWorldGen();
    worldGen.configFile = (new File(configDir, "ores.json"));
    worldGen.hConfigFile = (new File(configDir, "ores.hjson"));
    TechRebornAPI.subItemRetriever = new SubItemRetriever();
    for (ICompatModule compatModule : CompatManager.INSTANCE.compatModules) {
        compatModule.preInit(event);
    }
    // Register ModBlocks
    ModBlocks.init();
    // Register Fluids
    ModFluids.init();
    // Register ModItems
    ModItems.init();
    // Entitys
    EntityRegistry.registerModEntity(EntityNukePrimed.class, "nuke", 0, INSTANCE, 160, 5, true);
    proxy.preInit(event);
    RecipeConfigManager.load(event.getModConfigurationDirectory());
    versionChecker = new VersionChecker("TechReborn", new ModInfo());
    versionChecker.checkVersionThreaded();
    logHelper.info("PreInitialization Complete");
}
Also used : VersionChecker(reborncore.common.util.VersionChecker) TechRebornWorldGen(techreborn.world.TechRebornWorldGen) ICompatModule(techreborn.compat.ICompatModule) File(java.io.File) ModInfo(techreborn.lib.ModInfo)

Aggregations

File (java.io.File)1 VersionChecker (reborncore.common.util.VersionChecker)1 ICompatModule (techreborn.compat.ICompatModule)1 ModInfo (techreborn.lib.ModInfo)1 TechRebornWorldGen (techreborn.world.TechRebornWorldGen)1