Search in sources :

Example 1 with MCRegistryDefault

use of ivorius.ivtoolkit.tools.MCRegistryDefault in project RecurrentComplex by Ivorforce.

the class RecurrentComplex method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    logger = event.getModLog();
    config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();
    RCConfig.loadConfig(null);
    config.save();
    // After loading config, re-test vanilla acceptance, because of lightweight mode
    NetworkRegistry.INSTANCE.registry().get(Loader.instance().getIndexedModList().get(MOD_ID)).testVanillaAcceptance();
    logger.trace(isLite() ? "Entering lightweight mode!" : "Entering default mode!");
    loader = new FileLoader();
    saver = new FileSaver();
    remapper = new FMLRemapper();
    specialRegistry = new MCRegistrySpecial(mcRegistry = new MCRegistryRemapping(new MCRegistryDefault(), remapper), remapper);
    cremapper = new FMLRemapperConvenience(MOD_ID, specialRegistry, remapper);
    missingRemapper = new FMLMissingRemapper(new MCRegistryDefault(), remapper);
    forgeEventHandler = new RCForgeEventHandler();
    forgeEventHandler.register();
    terrainEventHandler = new RCTerrainGenEventHandler();
    terrainEventHandler.register();
    recurrentComplexEventHandler = new RCRecurrentComplexEventHandler();
    recurrentComplexEventHandler.register();
    guiHandler = new RCGuiHandler();
    IvGuiRegistry.INSTANCE.register(MOD_ID, guiHandler);
    communicationHandler = new RCCommunicationHandler(logger, MOD_ID, instance);
    RCRegistryHandler.preInit(event, this);
    proxy.preInit(event);
}
Also used : Configuration(net.minecraftforge.common.config.Configuration) RCGuiHandler(ivorius.reccomplex.gui.RCGuiHandler) MCRegistrySpecial(ivorius.reccomplex.world.gen.feature.structure.registry.MCRegistrySpecial) RCForgeEventHandler(ivorius.reccomplex.events.handlers.RCForgeEventHandler) FileSaver(ivorius.reccomplex.files.saving.FileSaver) MCRegistryDefault(ivorius.ivtoolkit.tools.MCRegistryDefault) RCRecurrentComplexEventHandler(ivorius.reccomplex.events.handlers.RCRecurrentComplexEventHandler) FileLoader(ivorius.reccomplex.files.loading.FileLoader) RCTerrainGenEventHandler(ivorius.reccomplex.events.handlers.RCTerrainGenEventHandler) RCTerrainGenEventHandler(ivorius.reccomplex.events.handlers.RCTerrainGenEventHandler) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler) RCForgeEventHandler(ivorius.reccomplex.events.handlers.RCForgeEventHandler) RCRecurrentComplexEventHandler(ivorius.reccomplex.events.handlers.RCRecurrentComplexEventHandler)

Aggregations

MCRegistryDefault (ivorius.ivtoolkit.tools.MCRegistryDefault)1 RCForgeEventHandler (ivorius.reccomplex.events.handlers.RCForgeEventHandler)1 RCRecurrentComplexEventHandler (ivorius.reccomplex.events.handlers.RCRecurrentComplexEventHandler)1 RCTerrainGenEventHandler (ivorius.reccomplex.events.handlers.RCTerrainGenEventHandler)1 FileLoader (ivorius.reccomplex.files.loading.FileLoader)1 FileSaver (ivorius.reccomplex.files.saving.FileSaver)1 RCGuiHandler (ivorius.reccomplex.gui.RCGuiHandler)1 MCRegistrySpecial (ivorius.reccomplex.world.gen.feature.structure.registry.MCRegistrySpecial)1 Configuration (net.minecraftforge.common.config.Configuration)1 EventHandler (net.minecraftforge.fml.common.Mod.EventHandler)1