@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)); }
@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(); }
@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"); }
@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"); }
@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."); }
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(); }
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); }
@Override public void init(FMLInitializationEvent event) { bindingP = new KeyBinding("Player Information", Keyboard.KEY_P, "Lost Eclipse"); ClientRegistry.registerKeyBinding(bindingP); }
@EventHandler public void init(FMLInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); GameRegistry.registerWorldGenerator(new LSCWorldGenerator(), 100); proxy.init(event); }
@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(); } } }
@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(); }); }
@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(); } } }
@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); }
@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())); }); }
@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 }; }
@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); }
@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); }
@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' }); }
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); }
@EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(proxy); MinecraftForge.EVENT_BUS.register(ServerHelper.I); proxy.init(); }
@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)); // } }
@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"); }
@Mod.EventHandler public void init(FMLInitializationEvent e) { proxy.init(e); }
@Override public void init(FMLInitializationEvent event) { super.init(event); Proxy.INSTANCE.invoke(event, LoaderState.INITIALIZATION,Side.CLIENT); }
@EventHandler public static void init(FMLInitializationEvent event){ proxy.init(); }
public void init(FMLInitializationEvent e){ super.init(e); }
@EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); }
@EventHandler public void init(FMLInitializationEvent event) { Log.info("" + ForgeVersion.mcVersion); }
@Override public void init(FMLInitializationEvent e) { super.init(e); }
public void init(FMLInitializationEvent event){ OFTRegistry.instance.init(); }
@Override public void OnInit(FMLInitializationEvent e) { super.OnInit(e); }
@EventHandler public void init(FMLInitializationEvent e){ proxy.init(e); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); }
public static void loadRemovedRecipes(FMLInitializationEvent e) { BBJsonLoader.initialize(); loadJsonConfig(e, RemovalConfig.INSTANCE); }
@EventHandler public void init(FMLInitializationEvent event) { proxy.init(); }
@Override @SideOnly(Side.CLIENT) public void init(FMLInitializationEvent e) { super.init(e); registerItemTints(); }
@Mod.EventHandler public void postInit(FMLInitializationEvent event) { System.out.println("SHOOPCRAFT: POST-Initializing"); }
@EventHandler public void init(FMLInitializationEvent event) { PROXY.init(event); }
@EventHandler public void init(FMLInitializationEvent event) { proxy.init(); PacketHandler.init(); NetworkRegistry.INSTANCE.registerGuiHandler(SimpleTubes.instance, new GuiHandler()); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(); }