Search in sources :

Example 21 with EventHandler

use of cpw.mods.fml.common.Mod.EventHandler in project Minechem by iopleke.

the class Minechem method init.

@EventHandler
public void init(FMLInitializationEvent event) {
    LogHelper.debug("Registering Recipes...");
    RecipeRegistry.getInstance().init();
    LogHelper.debug("Registering GUI and Container handlers...");
    NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
    LogHelper.debug("Registering Renderers...");
    proxy.registerRenderers();
    LogHelper.debug("Registering Fonts...");
    proxy.registerFonts();
    LogHelper.debug("Registering Achievements...");
    AchievementHandler.init();
}
Also used : GuiHandler(minechem.handler.GuiHandler) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 22 with EventHandler

use of cpw.mods.fml.common.Mod.EventHandler in project BetterStorage by copygirl.

the class BetterStorage method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    networkChannel = new ChannelHandler();
    log = event.getModLog();
    creativeTab = new CreativeTabBetterStorage();
    Addon.initialize();
    globalConfig = new GlobalConfig(event.getSuggestedConfigurationFile());
    Addon.setupConfigsAll();
    globalConfig.load();
    globalConfig.save();
    BetterStorageTiles.initialize();
    BetterStorageItems.initialize();
    EnchantmentBetterStorage.initialize();
    BetterStorageTileEntities.register();
    BetterStorageEntities.register();
    DungeonLoot.add();
}
Also used : GlobalConfig(net.mcft.copy.betterstorage.config.GlobalConfig) CreativeTabBetterStorage(net.mcft.copy.betterstorage.misc.CreativeTabBetterStorage) ChannelHandler(net.mcft.copy.betterstorage.network.ChannelHandler) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 23 with EventHandler

use of cpw.mods.fml.common.Mod.EventHandler in project PneumaticCraft by MineMaarten.

the class PneumaticCraft method load.

@EventHandler
public void load(FMLInitializationEvent event) {
    NetworkHandler.init();
    if (Config.enableDungeonLoot) {
        ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.stopWorm), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
        ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING).addItem(new WeightedRandomChestContent(new ItemStack(Itemss.nukeVirus), 1, 4, 10));
    }
    proxy.init();
    ThirdPartyManager.instance().init();
}
Also used : WeightedRandomChestContent(net.minecraft.util.WeightedRandomChestContent) ItemStack(net.minecraft.item.ItemStack) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 24 with EventHandler

use of cpw.mods.fml.common.Mod.EventHandler in project PneumaticCraft by MineMaarten.

the class PneumaticCraft method onServerStart.

@EventHandler
public void onServerStart(FMLServerStartingEvent event) {
    ServerCommandManager comManager = (ServerCommandManager) MinecraftServer.getServer().getCommandManager();
    new PCCommandManager().init(comManager);
}
Also used : ServerCommandManager(net.minecraft.command.ServerCommandManager) PCCommandManager(pneumaticCraft.common.commands.PCCommandManager) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Example 25 with EventHandler

use of cpw.mods.fml.common.Mod.EventHandler in project PneumaticCraft by MineMaarten.

the class PneumaticCraft method onMissingMapping.

@EventHandler
public void onMissingMapping(FMLMissingMappingsEvent event) {
    for (MissingMapping mapping : event.get()) {
        if (mapping.type == GameRegistry.Type.BLOCK && mapping.name.equals("PneumaticCraft:etchingAcid")) {
            mapping.remap(Fluids.etchingAcid.getBlock());
            Log.info("Remapping Etching Acid");
        }
        if (mapping.type == GameRegistry.Type.ITEM && mapping.name.equals("PneumaticCraft:etchingAcidBucket")) {
            mapping.remap(Fluids.getBucket(Fluids.etchingAcid));
            Log.info("Remapping Etching Acid Bucket");
        }
    }
}
Also used : MissingMapping(cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping) EventHandler(cpw.mods.fml.common.Mod.EventHandler)

Aggregations

EventHandler (cpw.mods.fml.common.Mod.EventHandler)34 ItemStack (net.minecraft.item.ItemStack)9 WorldConversionEventHandler (com.bluepowermod.convert.WorldConversionEventHandler)4 BPEventHandler (com.bluepowermod.event.BPEventHandler)4 MRHandlerItemStack (com.builtbroken.mc.lib.recipe.item.MRHandlerItemStack)4 Configuration (net.minecraftforge.common.config.Configuration)4 ServerCommandManager (net.minecraft.command.ServerCommandManager)3 IWorkerThread (com.builtbroken.mc.api.process.IWorkerThread)2 MissingMapping (cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping)2 ICommandManager (net.minecraft.command.ICommandManager)2 AMConfig (am2.configuration.AMConfig)1 SkillConfiguration (am2.configuration.SkillConfiguration)1 GUIHandler (com.bluepowermod.client.gui.GUIHandler)1 Config (com.bluepowermod.init.Config)1 RedstoneProviderQmunityLib (com.bluepowermod.redstone.RedstoneProviderQmunityLib)1 RedstoneProviderVanilla (com.bluepowermod.redstone.RedstoneProviderVanilla)1 WorldGenerationHandler (com.bluepowermod.world.WorldGenerationHandler)1 ProxyASMTest (com.builtbroken.mc.core.asm.ProxyASMTest)1 BlockHeatedStone (com.builtbroken.mc.core.content.blocks.BlockHeatedStone)1 ItemDevData (com.builtbroken.mc.core.content.debug.ItemDevData)1