Search in sources :

Example 1 with ManifestUpgrader

use of com.teamwizardry.wizardry.common.core.version.manifest.ManifestUpgrader in project Wizardry by TeamWizardry.

the class CommonProxy method preInit.

public void preInit(FMLPreInitializationEvent event) {
    directory = new File(event.getModConfigurationDirectory(), Wizardry.MODID);
    if (!directory.exists())
        if (!directory.mkdirs())
            Wizardry.LOGGER.fatal("    > SOMETHING WENT WRONG! Could not create config folder!!");
    new SpellData.DefaultKeys();
    ManifestUpgrader maniUpgrader = ManifestHandler.INSTANCE.startUpgrade(directory);
    maniUpgrader.changeCategoryName("modules", "wizmodules");
    maniUpgrader.finalizeUpgrade();
    ManifestHandler.INSTANCE.loadNewInternalManifest("wizmodules", "fluid_recipes", "fire_recipes");
    ManifestHandler.INSTANCE.loadExternalManifest(directory);
    ManifestHandler.INSTANCE.processComparisons(directory, "wizmodules", "fluid_recipes", "fire_recipes");
    new ModTab();
    ModBlocks.init();
    ModItems.init();
    ModSounds.init();
    ModPotions.init();
    ModEntities.init();
    ModCapabilities.preInit();
    NetworkRegistry.INSTANCE.registerGuiHandler(Wizardry.instance, new GuiHandler());
    Wizardry.underWorld = DimensionType.register("underworld", "_dim", ConfigValues.underworldID, WorldProviderUnderWorld.class, false);
    // Wizardry.torikki = DimensionType.register("torikki", "_dim", ConfigValues.torikkiID, WorldProviderTorikki.class, false);
    DimensionManager.registerDimension(ConfigValues.underworldID, Wizardry.underWorld);
    // DimensionManager.registerDimension(ConfigValues.torikkiID, Wizardry.torikki);
    MinecraftForge.EVENT_BUS.register(ArenaManager.INSTANCE);
    MinecraftForge.EVENT_BUS.register(new WorldProviderUnderWorld());
    MinecraftForge.EVENT_BUS.register(new EventHandler());
    MinecraftForge.EVENT_BUS.register(new AchievementEvents());
    MinecraftForge.EVENT_BUS.register(new ModuleEffectTimeSlow());
    MinecraftForge.EVENT_BUS.register(new ModuleEffectLeap());
    MinecraftForge.EVENT_BUS.register(ModBiomes.BIOME_UNDERWORLD);
    // MinecraftForge.EVENT_BUS.register(ModBiomes.BIOME_TORIKKI);
    // MinecraftForge.EVENT_BUS.register(ModBiomes.BIOME_TORIKKISEA);
    MinecraftForge.EVENT_BUS.register(this);
    WizardryWorldCapability.init();
    WizardryChunkCapability.init();
    PacketHandler.register(PacketSendSpellToBook.class, Side.SERVER);
    PacketHandler.register(PacketRenderSpell.class, Side.CLIENT);
    PacketHandler.register(PacketExplode.class, Side.CLIENT);
    PacketHandler.register(PacketFreezePlayer.class, Side.CLIENT);
    PacketHandler.register(PacketRenderLightningBolt.class, Side.CLIENT);
    PacketHandler.register(PacketSyncCooldown.class, Side.CLIENT);
    PacketHandler.register(PacketDevilDustFizzle.class, Side.CLIENT);
    PageTypes.INSTANCE.registerPageProvider("wizardry_structure", PageWizardryStructure::new);
    ItemBook.BOOK = new Book("book");
    Wizardry.LOGGER.info("Initializing fairy task plugins...");
    for (final WizardryPlugin plugin : ServiceLoader.load(WizardryPlugin.class)) {
        Wizardry.LOGGER.info("Initializing plugin {}", plugin.getClass().getName());
        plugin.onInit(context);
    }
    Wizardry.LOGGER.info("Initialization complete!");
}
Also used : ManifestUpgrader(com.teamwizardry.wizardry.common.core.version.manifest.ManifestUpgrader) ModuleEffectLeap(com.teamwizardry.wizardry.common.module.effects.ModuleEffectLeap) WizardryPlugin(com.teamwizardry.wizardry.api.plugin.WizardryPlugin) EventHandler(com.teamwizardry.wizardry.common.core.EventHandler) GuiHandler(com.teamwizardry.wizardry.client.gui.GuiHandler) WorldProviderUnderWorld(com.teamwizardry.wizardry.common.world.underworld.WorldProviderUnderWorld) PageWizardryStructure(com.teamwizardry.wizardry.client.gui.book.PageWizardryStructure) AchievementEvents(com.teamwizardry.wizardry.common.advancement.AchievementEvents) ItemBook(com.teamwizardry.wizardry.common.item.ItemBook) Book(com.teamwizardry.librarianlib.features.gui.provided.book.hierarchy.book.Book) File(java.io.File) ModuleEffectTimeSlow(com.teamwizardry.wizardry.common.module.effects.ModuleEffectTimeSlow)

Aggregations

Book (com.teamwizardry.librarianlib.features.gui.provided.book.hierarchy.book.Book)1 WizardryPlugin (com.teamwizardry.wizardry.api.plugin.WizardryPlugin)1 GuiHandler (com.teamwizardry.wizardry.client.gui.GuiHandler)1 PageWizardryStructure (com.teamwizardry.wizardry.client.gui.book.PageWizardryStructure)1 AchievementEvents (com.teamwizardry.wizardry.common.advancement.AchievementEvents)1 EventHandler (com.teamwizardry.wizardry.common.core.EventHandler)1 ManifestUpgrader (com.teamwizardry.wizardry.common.core.version.manifest.ManifestUpgrader)1 ItemBook (com.teamwizardry.wizardry.common.item.ItemBook)1 ModuleEffectLeap (com.teamwizardry.wizardry.common.module.effects.ModuleEffectLeap)1 ModuleEffectTimeSlow (com.teamwizardry.wizardry.common.module.effects.ModuleEffectTimeSlow)1 WorldProviderUnderWorld (com.teamwizardry.wizardry.common.world.underworld.WorldProviderUnderWorld)1 File (java.io.File)1