Search in sources :

Example 11 with EventHandler

use of net.minecraftforge.fml.common.Mod.EventHandler in project SecurityCraft by Geforce132.

the class mod_SecurityCraft method serverStarting.

@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    event.registerServerCommand(new CommandSC());
    event.registerServerCommand(new CommandModule());
}
Also used : CommandModule(net.geforcemods.securitycraft.commands.CommandModule) CommandSC(net.geforcemods.securitycraft.commands.CommandSC) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler) ForgeEventHandler(net.geforcemods.securitycraft.handlers.ForgeEventHandler)

Example 12 with EventHandler

use of net.minecraftforge.fml.common.Mod.EventHandler in project SecurityCraft by Geforce132.

the class mod_SecurityCraft method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    log("Starting to load....");
    log("Loading config file....");
    log(mod_SecurityCraft.VERSION + " of SecurityCraft is for a post MC-1.6.4 version! Configuration files are useless for setting anything besides options.");
    mod_SecurityCraft.configFile = new Configuration(event.getSuggestedConfigurationFile());
    mod_SecurityCraft.configHandler.setupConfiguration();
    log("Config file loaded.");
    log("Setting up handlers!");
    mod_SecurityCraft.configHandler.setupHandlers(event);
    log("Handlers registered.");
    log("Setting up network....");
    mod_SecurityCraft.network = NetworkRegistry.INSTANCE.newSimpleChannel(mod_SecurityCraft.MODID);
    mod_SecurityCraft.configHandler.setupPackets(mod_SecurityCraft.network);
    log("Network setup.");
    log("Loading mod additions....");
    mod_SecurityCraft.configHandler.setupAdditions();
    if (mod_SecurityCraft.debuggingMode) {
        mod_SecurityCraft.configHandler.setupDebugAdditions();
    }
    log("Finished loading mod additions.");
    log("Doing registering stuff... (PT 1/2)");
    mod_SecurityCraft.configHandler.setupGameRegistry();
    mod_SecurityCraft.serverProxy.setupTextureRegistry();
    serverProxy.registerTextureFiles();
    ModMetadata modMeta = event.getModMetadata();
    modMeta.authorList = Arrays.asList(new String[] { "Geforce, bl4ckscor3" });
    modMeta.autogenerated = false;
    modMeta.credits = "Thanks to all of you guys for your support!";
    modMeta.description = "Adds a load of things to keep your house safe with.\nIf you like this mod, hit the green arrow\nin the corner of the forum thread!\nPlease visit the URL above for help. \n \nMessage of the update: \n" + MOTU;
    modMeta.url = "http://geforcemods.net";
    modMeta.logoFile = "/scLogo.png";
}
Also used : Configuration(net.minecraftforge.common.config.Configuration) ModMetadata(net.minecraftforge.fml.common.ModMetadata) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler) ForgeEventHandler(net.geforcemods.securitycraft.handlers.ForgeEventHandler)

Example 13 with EventHandler

use of net.minecraftforge.fml.common.Mod.EventHandler in project VanillaTeleporter by dyeo.

the class TeleporterMod method init.

@EventHandler
public void init(FMLInitializationEvent event) {
    proxy.init();
    MinecraftForge.EVENT_BUS.register(new TeleportEventHandler());
}
Also used : TeleportEventHandler(net.dyeo.teleporter.event.TeleportEventHandler) TeleportEventHandler(net.dyeo.teleporter.event.TeleportEventHandler) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler)

Example 14 with EventHandler

use of net.minecraftforge.fml.common.Mod.EventHandler in project VanillaTeleporter by dyeo.

the class TeleporterMod method serverStarting.

@EventHandler
public void serverStarting(FMLServerStartingEvent event) {
    event.registerServerCommand(new CommandTeleportReset());
    event.registerServerCommand(new CommandTeleporters());
}
Also used : CommandTeleporters(net.dyeo.teleporter.command.CommandTeleporters) CommandTeleportReset(net.dyeo.teleporter.command.CommandTeleportReset) TeleportEventHandler(net.dyeo.teleporter.event.TeleportEventHandler) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler)

Example 15 with EventHandler

use of net.minecraftforge.fml.common.Mod.EventHandler in project BetterWithAddons by DaedalusGame.

the class BetterWithAddons method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    creativeTab = new BWACreativeTab();
    config = new ModConfiguration();
    logger = event.getModLog();
    config.preInit(event);
    ModBlocks.load(event);
    ModItems.load(event);
    ModTileEntities.register();
    ModEntities.init();
    ModPotions.preInit(event);
    ModInteractions.preInit(event);
    proxy.preInit();
    ModInteractions.preInitEnd(event);
    MinecraftForge.EVENT_BUS.register(this);
    NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
}
Also used : GuiHandler(betterwithaddons.client.GuiHandler) ModConfiguration(betterwithaddons.config.ModConfiguration) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler)

Aggregations

EventHandler (net.minecraftforge.fml.common.Mod.EventHandler)33 ItemStack (net.minecraft.item.ItemStack)5 Configuration (net.minecraftforge.common.config.Configuration)5 File (java.io.File)3 ForgeEventHandler (net.geforcemods.securitycraft.handlers.ForgeEventHandler)3 BookshelfEvents (net.darkhax.bookshelf.BookshelfEvents)2 ChestBuilder (net.darkhax.bookshelf.builder.ChestBuilder)2 RegistryHelper (net.darkhax.bookshelf.registry.RegistryHelper)2 TeleportEventHandler (net.dyeo.teleporter.event.TeleportEventHandler)2 CommandModule (net.geforcemods.securitycraft.commands.CommandModule)2 CommandSC (net.geforcemods.securitycraft.commands.CommandSC)2 Block (net.minecraft.block.Block)2 ItemBlock (net.minecraft.item.ItemBlock)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 ModMetadata (net.minecraftforge.fml.common.ModMetadata)2 WorldTypeMessageEventHandler (rtg.event.WorldTypeMessageEventHandler)2 ControlGUIHandler (ValkyrienWarfareControl.GUI.ControlGUIHandler)1 ValkyrienWarfareWorldGen (ValkyrienWarfareWorld.WorldGen.ValkyrienWarfareWorldGen)1 GuiHandler (betterwithaddons.client.GuiHandler)1 ModConfiguration (betterwithaddons.config.ModConfiguration)1