Java 类net.minecraftforge.fml.common.event.FMLInitializationEvent 实例源码

项目:Device-Mod-Apps    文件:Main.java   
@EventHandler
public void init(FMLInitializationEvent e) {
    proxy.init(e);

    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Cat", SoundEvents.RECORD_CAT,         183000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Blocks", SoundEvents.RECORD_BLOCKS,   327000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Chirp", SoundEvents.RECORD_CHIRP,     183000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Far", SoundEvents.RECORD_FAR,         152400000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Mall", SoundEvents.RECORD_MALL,       190200000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Mellohi", SoundEvents.RECORD_MELLOHI, 81600000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Stal", SoundEvents.RECORD_STAL,       138000000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Strad", SoundEvents.RECORD_STRAD,     184800000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Wait", SoundEvents.RECORD_WAIT,       214800000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Ward", SoundEvents.RECORD_WARD,       246600000));
    //ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - 11",    SoundEvents.RECORD_11,        66600000));
    ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - 13", SoundEvents.RECORD_13,           154800000));
}
项目:FirstAid    文件:FirstAid.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    CapabilityExtendedHealthSystem.register();

    int i = 0;
    NETWORKING = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
    NETWORKING.registerMessage(MessageReceiveDamage.Handler.class, MessageReceiveDamage.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageApplyHealingItem.Handler.class, MessageApplyHealingItem.class, ++i , Side.SERVER);
    NETWORKING.registerMessage(MessageReceiveConfiguration.Handler.class, MessageReceiveConfiguration.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageApplyAbsorption.Handler.class, MessageApplyAbsorption.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageAddHealth.Handler.class, MessageAddHealth.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessagePlayHurtSound.Handler.class, MessagePlayHurtSound.class, ++i, Side.CLIENT);
    NETWORKING.registerMessage(MessageClientUpdate.Handler.class, MessageClientUpdate.class, ++i, Side.SERVER);
    NETWORKING.registerMessage(MessageResync.Handler.class, MessageResync.class, ++i, Side.CLIENT);
    MessageReceiveConfiguration.validate();

    if (Loader.isModLoaded("morpheus")) {
        enableMorpheusCompat = true;
        logger.info("Morpheus present - enabling compatibility module");
        MorpheusHelper.register();
    }

    RegistryManager.registerDefaults();
    checkEarlyExit();
}
项目:ObsidianSuite    文件:ObsidianAnimator.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{       
    FMLInterModComms.sendRuntimeMessage(MODID, "VersionChecker", "addVersionCheck", VERSION_LINK);

    instance = this;        
    proxy.init();

       EventHandler eventHandler = new EventHandler();
       MinecraftForge.EVENT_BUS.register(eventHandler);

       if(FMLCommonHandler.instance().getEffectiveSide().isClient())
           FMLCommonHandler.instance().bus().register(eventHandler);

       //Minecraft.getMinecraft().gameSettings.showInventoryAchievementHint = false;
       Minecraft.getMinecraft().gameSettings.saveOptions();

       //Stop space from activating buttons, allowing it to be used for adding keyframes in the timeline.
       InputMap im = (InputMap)UIManager.get("Button.focusInputMap");
       im.put(KeyStroke.getKeyStroke("pressed SPACE"), "none");
       im.put(KeyStroke.getKeyStroke("released SPACE"), "none");
}
项目:Never-Enough-Currency    文件:Currency.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    proxy.init(event);

    NetworkRegistry.INSTANCE.registerGuiHandler(Currency.INSTANCE, new GuiHandler());

    AccountCapability.register();
    CartCapability.register();

    PacketDispatcher.registerPackets();

    FMLInterModComms.sendMessage("waila", "register", "com.zundrel.currency.common.compat.waila.CurrencyWailaProvider.callbackRegister");

    GameRegistry.registerTileEntity(TileEntityShopController.class, ModInfo.MODID + ":" + "shop_controller");
    GameRegistry.registerTileEntity(TileEntityDisplay.class, ModInfo.MODID + ":" + "display");
    GameRegistry.registerTileEntity(TileEntityStockCrate.class, ModInfo.MODID + ":" + "stock_crate");
}
项目:ProjectEon    文件:ProjectEon.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    LOG.info("Initializing ProjectEon");
    LOG.debug("Registering base...");
    PROXY.registerBase();
    LOG.debug("Registering blocks...");
    PROXY.registerBlocks();
    LOG.debug("Registering items...");
    PROXY.registerItems();
    LOG.debug("Registering tile entities...");
    PROXY.registerTileEntities();
    LOG.debug("Registering entities...");
    PROXY.registerEntities();
    LOG.debug("Registering packets...");
    PROXY.registerPackets();
    LOG.debug("Registering handlers...");
    PROXY.registerHandlers();
    LOG.info("Done.");
}
项目:CharcoalPit    文件:CommonProxy.java   
public void init(FMLInitializationEvent e){
    //tile entity
    GameRegistry.registerTileEntity(TileActivePile.class, Constants.MODID+"active_pile");
    GameRegistry.registerTileEntity(TileCreosoteCollector.class, Constants.MODID+"creosote_collector");
    GameRegistry.registerTileEntity(TilePotteryKiln.class, Constants.MODID+"pottery_kiln");

    GameRegistry.registerFuelHandler(new FuelRegistry());
    MinecraftForge.EVENT_BUS.register(new PileIgnitr());
    MinecraftForge.EVENT_BUS.register(new PotionRegistry());

    PotionRegistry.initPotions();
    ItemsRegistry.initOreDict();

    if(!Config.DisableDefaultPottery)
        PotteryKilnRecipe.initRecipes();
    PotteryKilnRecipe.initCustomRecipes(Config.PotteryRecipes);
    if(Config.RegisterRecipes)
        Crafting.registerRecipes();
}
项目:Proyecto-DASI    文件:MalmoModClient.java   
public void init(FMLInitializationEvent event)
{
       // Register for various events:
       FMLCommonHandler.instance().bus().register(this);
       MinecraftForge.EVENT_BUS.register(this);

       GameSettings settings = Minecraft.getMinecraft().gameSettings;
       setUpExtraKeys(settings);

       this.stateMachine = new ClientStateMachine(ClientState.WAITING_FOR_MOD_READY, this);

       this.originalMouseHelper = Minecraft.getMinecraft().mouseHelper;
       this.mouseHook = new MouseHook();
       this.mouseHook.isOverriding = true;
       Minecraft.getMinecraft().mouseHelper = this.mouseHook;
       setInputType(InputType.AI);
   }
项目:Loot-Slash-Conquer    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent event)
{
    bindingP = new KeyBinding("Player Information", Keyboard.KEY_P, "Lost Eclipse");

    ClientRegistry.registerKeyBinding(bindingP);
}
项目:Loot-Slash-Conquer    文件:LootSlashConquer.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
    GameRegistry.registerWorldGenerator(new LSCWorldGenerator(), 100);
    proxy.init(event);
}
项目:BetterBeginningsReborn    文件:SmelterConfig.java   
@Override
public void loadIncludedConfig(FMLInitializationEvent e, List<String> includedJsons)
{
    for (String json : includedJsons)
    {
        JsonSmelterRecipeHandler handler = BBJsonLoader.deserializeObject(json, JsonSmelterRecipeHandler.class);

        if (handler == null)
        {
            LogUtil.log(Level.ERROR, "Could not deserialize included json.");
            continue;
        }

        boolean missingDependencies = false;
        for (String mod : handler.getModDependencies())
        {
            if (!Loader.isModLoaded(mod))
            {
                LogUtil.log(Level.WARN, "Mod '" + mod + "' missing, skipping all recipes in file.");
                missingDependencies = true;
                break;
            }
        }

        if (missingDependencies)
        {
            continue;
        }

        includes.add(handler);

        for (JsonSmelterRecipe r : handler.getRecipes())
        {
            r.register();
        }
    }
}
项目:TextDisplayer    文件:TextDisplayerMod.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    MessageParser.remake();
    ClientCommandHandler.instance.registerCommand(new TextCommand());
    MinecraftForge.EVENT_BUS.register(events = new TextEvents());

    Minecraft.getMinecraft().addScheduledTask(() -> {
        websiteUtils.begin();
        loader.begin();
    });
}
项目:BetterBeginningsReborn    文件:BoosterConfig.java   
@Override
public void loadIncludedConfig(FMLInitializationEvent e, List<String> includedJsons)
{
    for (String json : includedJsons)
    {
        JsonBoosterHandler handler = BBJsonLoader.deserializeObject(json, JsonBoosterHandler.class);

        if (handler == null)
        {
            LogUtil.log(Level.ERROR, "Could not deserialize included json.");
            continue;
        }

        boolean missingDependencies = false;
        for (String mod : handler.getModDependencies())
        {
            if (!Loader.isModLoaded(mod))
            {
                LogUtil.log(Level.WARN, "Mod '" + mod + "' missing, skipping all recipes in file.");
                missingDependencies = true;
                break;
            }
        }

        if (missingDependencies)
        {
            continue;
        }

        includes.add(handler);

        for (JsonBooster r : handler.getBoosters())
        {
            r.register();
        }
    }
}
项目:mc-XPBox    文件:XPBox.java   
@Mod.EventHandler
public void init(FMLInitializationEvent e) {
   // register recipe
   BlockXPBox.registerRecipe();

   // register xp capability
   CapabilityManager.INSTANCE.register(XPCapability.class,
         new XPCapability.Storage(),
         XPCapability::new);

   // register event handler
   MinecraftForge.EVENT_BUS.register(this);
}
项目:CreeperKiller    文件:CreeperKiller.java   
@Mod.EventHandler
public void init(FMLInitializationEvent e) {
    Map<Object, ModContainer> forgeListenerOwners = getForgeListenerOwners();

    // Remove HammerCore ads.
    forgeListenerOwners.entrySet().stream()
            .filter(objectModContainerEntry -> objectModContainerEntry.getKey().toString().contains("hammercore.client.RenderGui"))
            .forEach(objectModContainerEntry -> {
                // Remove the normal RenderGUI from the forge event bus, then generate a proxy.
                MinecraftForge.EVENT_BUS.unregister(objectModContainerEntry.getKey());
                MinecraftForge.EVENT_BUS.register(HammerKiller.createProxy(objectModContainerEntry.getKey()));
            });
}
项目:ExPetrum    文件:ExPBlocksRegistry.java   
@Override
public void init(FMLInitializationEvent evt)
{
    ExPBlocks.logs = new Block[]{ ExPBlocks.log0, ExPBlocks.log1, ExPBlocks.log2, ExPBlocks.log3, ExPBlocks.log4, ExPBlocks.log5, ExPBlocks.log6, ExPBlocks.log7, ExPBlocks.log8 };
    ExPBlocks.logsDeco = new Block[]{ ExPBlocks.logDeco0, ExPBlocks.logDeco1, ExPBlocks.logDeco2, ExPBlocks.logDeco3, ExPBlocks.logDeco4, ExPBlocks.logDeco5, ExPBlocks.logDeco6, ExPBlocks.logDeco7, ExPBlocks.logDeco8 };
    ExPBlocks.leaves = new Block[]{ ExPBlocks.leaf0, ExPBlocks.leaf1, ExPBlocks.leaf2, ExPBlocks.leaf3, ExPBlocks.leaf4, ExPBlocks.leaf5, ExPBlocks.leaf6, ExPBlocks.leaf7, ExPBlocks.leaf8 };
    ExPBlocks.shrubs = new Block[]{ ExPBlocks.shrubNormal, ExPBlocks.shrubBlooming, ExPBlocks.shrubAutumn, ExPBlocks.shrubDead };
    ExPBlocks.berryBushes = new Block[]{ ExPBlocks.berryBushNormal, ExPBlocks.berryBushBerries, ExPBlocks.berryBushAutumn, ExPBlocks.berryBushDead };
}
项目:minecraft-hue    文件:HueMod.java   
@EventHandler
public void init(FMLInitializationEvent event) throws UnsupportedEncodingException {
    HueManager.getInstance().start();
    this.listener = new EventListener();
    MinecraftForge.EVENT_BUS.register(this.listener);
    FMLCommonHandler.instance().bus().register(this.listener);
}
项目:Scripty    文件:ScriptyMod.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    // init
    MinecraftForge.EVENT_BUS.register(this);
    scriptyBlock = new ScriptyBlock();
    if (event.getSide() == Side.CLIENT) {
        RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
        renderItem.getItemModelMesher().register(Item.getItemFromBlock(scriptyBlock), 0, new ModelResourceLocation("scripty:" + scriptyBlock.getName(), "inventory"));
    }
    NetworkRegistry.INSTANCE.registerGuiHandler(this, gui);
}
项目:Lector    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent e) {
    super.init(e);

    font = FontLoader.createFont(new ResourceLocation(Lector.MODID, "fonts/ubuntu.ttf"), 128, true,
            new char[] { '\u2022', '\u2014' });
    font_bold = FontLoader.createFont(new ResourceLocation(Lector.MODID, "fonts/ubuntu_bold.ttf"), 128, true,
            new char[] { '\u2022', '\u2014' });
    font_italic = FontLoader.createFont(new ResourceLocation(Lector.MODID, "fonts/ubuntu_italic.ttf"), 128, true,
            new char[] { '\u2022', '\u2014' });
}
项目:BetterBeginningsReborn    文件:BBConfigFolderLoader.java   
public static void loadRecipes(FMLInitializationEvent e)
{
    loadJsonConfig(e, KilnConfig.INSTANCE);
    loadJsonConfig(e, SmelterConfig.INSTANCE);
    loadJsonConfig(e, BrickOvenConfig.INSTANCE);
    loadJsonConfig(e, AdvancedCraftingConfig.INSTANCE);
    loadJsonConfig(e, CampfireConfig.INSTANCE);
    loadJsonConfig(e, RepairInfusionConfig.INSTANCE);
    loadJsonConfig(e, BoosterConfig.INSTANCE);
}
项目:DebugServerInfo    文件:DebugServerInfo.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    MinecraftForge.EVENT_BUS.register(this);
    MinecraftForge.EVENT_BUS.register(proxy);
    MinecraftForge.EVENT_BUS.register(ServerHelper.I);

    proxy.init();
}
项目:BaseFoods    文件:ClientProxy.java   
@Override
    public void init(FMLInitializationEvent event) {
        super.init(event);

//      for (final String name : Items.getItemRegistry().keySet()) {
//          registerRenderOuter(Items.getItemByName(name));
//      }

//      for (final String name : Blocks.getBlockRegistry().keySet()) {
//          registerRenderOuter(Blocks.getBlockByName(name));
//      }
    }
项目:signal-catcher    文件:SignalCatcher.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    // Don't run client-side, it makes kill not kill the whole client.
    if (event.getSide() != Side.SERVER) return;
    sig("TERM");
    sig("INT");
    sig("HUP");
}
项目:Lanolin    文件:Lanolin.java   
@Mod.EventHandler
public void init(FMLInitializationEvent e) {
    proxy.init(e);
}
项目:Pangu    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent event) {
    super.init(event);
    Proxy.INSTANCE.invoke(event, LoaderState.INITIALIZATION,Side.CLIENT);
}
项目:MagicWinds    文件:MagicWinds.java   
@EventHandler
public static void init(FMLInitializationEvent event){
    proxy.init();
}
项目:CharcoalPit    文件:ServerProxy.java   
public void init(FMLInitializationEvent e){
    super.init(e);
}
项目:ChopDown    文件:ChopDown.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    MinecraftForge.EVENT_BUS.register(this);
}
项目:flex-fov    文件:TheMod.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    Log.info("" + ForgeVersion.mcVersion);
}
项目:Firma    文件:ServerProxy.java   
@Override
public void init(FMLInitializationEvent e) {
    super.init(e);
}
项目:OpenFlexiTrack    文件:CommonProxy.java   
public void init(FMLInitializationEvent event){
    OFTRegistry.instance.init();
}
项目:Anima-Mundi    文件:ClientProxy.java   
@Override
public void OnInit(FMLInitializationEvent e)
{
    super.OnInit(e);
}
项目:CharcoalPit    文件:CharcoalPit.java   
@EventHandler
public void init(FMLInitializationEvent e){
    proxy.init(e);
}
项目:uniquecrops    文件:UniqueCrops.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event) {

    proxy.init(event);
}
项目:BetterBeginningsReborn    文件:BBConfigFolderLoader.java   
public static void loadRemovedRecipes(FMLInitializationEvent e)
{
    BBJsonLoader.initialize();

    loadJsonConfig(e, RemovalConfig.INSTANCE);
}
项目:Halloween    文件:HalloweenMod.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    proxy.init();
}
项目:genera    文件:ClientProxy.java   
@Override
@SideOnly(Side.CLIENT)
public void init(FMLInitializationEvent e) {
    super.init(e);
    registerItemTints();
}
项目:ShoopCraft    文件:ShoopCraft.java   
@Mod.EventHandler
public void postInit(FMLInitializationEvent event) {
    System.out.println("SHOOPCRAFT: POST-Initializing");
}
项目:Solar    文件:Solar.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    PROXY.init(event);
}
项目:SimpleTubes    文件:SimpleTubes.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    proxy.init();
    PacketHandler.init();
    NetworkRegistry.INSTANCE.registerGuiHandler(SimpleTubes.instance, new GuiHandler());
}
项目:EntitiesTutorial    文件:EntitiesTutorial.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
    proxy.init();
}