@Mod.EventHandler public void init(FMLInitializationEvent event) { Configurator.configure(new File("config/" + MODID + ".cfg")); GameRegistry.registerWorldGenerator(new Decorator(), 4096); FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); // register CommonProxy as our GuiHandler NetworkRegistry.INSTANCE.registerGuiHandler(MODID, new CommonProxy()); ItemLoader.LoadItems(); BlockLoader.loadBlocks(); Recipes.registerRecpies(); EntityLoader.LoadEntitys(); OreDict.addores(); //Achievements.loadAchievements(); //Stats.RegisterStats(); GameRegistry.registerWorldGenerator(new ModWorldGen(), 0); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); ItemLoader.LoadItems(); //BlockLoader.loadBlocks(); Recipes.registerRecpies(); //EntityLoader.LoadEntitys(); //OreDict.addores(); Achievements.loadAchievements(); Stats.RegisterStats(); PlayerChecker.checkPlayer(username); LootRegistry.registerLoot(); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); ItemLoader.LoadItems(); BlockLoader.loadBlocks(); Recipes.registerRecpies(); EntityLoader.LoadEntitys(); OreDict.addores(); Achievements.loadAchievements(); Stats.RegisterStats(); EntityRegistry.registerModEntity(EntityGiantSnowBall.class, "GiantSnowBall", EntityRegistry.findGlobalUniqueEntityId(), MODID, 80, 3, true); proxy.registerRenderThings(); GameRegistry.registerTileEntity(TileEntityBulb.class, "Bulb"); TileEntity.addMapping(TileEntityBulb.class, "Bulb_Mapping"); BulbModelID = 72; }
@EventHandler public void init(FMLInitializationEvent evt) { INSTANCE.registerMessage(LobbyPlayerOpenedGuiPacketHandler.class, LobbyPlayerOpenedGuiPacket.class, 0, Side.SERVER); INSTANCE.registerMessage(LobbyBeginGamePacketHandler.class, LobbyBeginGamePacket.class, 1, Side.SERVER); INSTANCE.registerMessage(PacketSyncPlayerPropertiesClientHandler.class, PacketSyncPlayerPropertiesClient.class, 2, Side.CLIENT); INSTANCE.registerMessage(PacketSyncPlayerPropertiesServerHandler.class, PacketSyncPlayerPropertiesServer.class, 3, Side.SERVER); INSTANCE.registerMessage(PacketSyncTileEntityServerHandler.class, PacketSyncTileEntityServer.class, 4, Side.SERVER); INSTANCE.registerMessage(PacketSyncTileEntityClientHandler.class, PacketSyncTileEntityClient.class, 5, Side.CLIENT); NetworkRegistry.INSTANCE.registerGuiHandler(PAYDAY.instance, new MGuiHandler()); GameRegistry.registerBlock(lobbyBlock, "Lobby"); GameRegistry.registerTileEntity(LobbyTileEntity.class, "lobby_tile_entity"); FMLCommonHandler.instance().bus().register(eventHandler); MinecraftForge.EVENT_BUS.register(eventHandler); }
@EventHandler public void init(FMLInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); ModRecipes.init(); proxy.registerEvents(); proxy.registerEntities(); proxy.registerRenderers(); if (ModEntityList.hasEntitiesWithEggs()) { ModEntityList.entity_egg = new ItemEntityEgg(); GameRegistry.registerItem(ModEntityList.entity_egg, "entity_egg"); OreDictionary.registerOre("mobEgg", ModEntityList.entity_egg); } isTinkersConstructLoaded = Loader.isModLoaded("TConstruct"); }
public void init(final FMLInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler((Object)ExtraUtilsMod.instance, (IGuiHandler)new GuiHandler()); if (Loader.isModLoaded("ForgeMultipart")) { this.FMPRegisterPassThroughInterfaces(); } ExtraUtilsMod.proxy.registerEventHandler(); ExtraUtilsMod.proxy.registerRenderInformation(); if (Loader.isModLoaded("ThermalExpansion")) { TE4IMC.addIntegration(); } if (Loader.isModLoaded("MineFactoryReloaded")) { MFRIntegration.registerMFRIntegration(); } for (final ILoading loader : this.loaders) { loader.init(); } EE3Integration.finalRegister(); }
@EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new NoteblockPlaceHandler()); cpw.mods.fml.common.FMLCommonHandler.instance().bus().register(new CreditNotifer()); INSTANCE.registerMessage(BlockMessageHandler.class, BlockMessage.class, 0, Side.SERVER); INSTANCE.registerMessage(BlockEnhancedMessageHandler.class, BlockEnhancedMessage.class, 1, Side.SERVER); Mapping.init(); RealPianoMapping.init(); itemNbT = new ItemNoteblockFork(); itemNbT.setUnlocalizedName("noteblockfork"); itemNbT.setTextureName("noteblocktweak:noteblock_fork_hand"); itemNbT.setMaxStackSize(1); itemNbT.setCreativeTab(CreativeTabs.tabTools); GameRegistry.registerItem(itemNbT, "NoteblockFork"); BLOCKN = new BlockEnhancedNote(); GameRegistry.registerBlock(BLOCKN, "EnhancedNoteBlock"); GameRegistry.registerTileEntity(TileEntityEnhancedNote.class, "tileenhancednote"); }
@EventHandler public void initialize(FMLInitializationEvent event) { TerraFirmaCraft.PACKET_PIPELINE.registerPacket(InitClientWorldPacket.class); FMLCommonHandler.instance().bus().register(new PlayerTracker()); MinecraftForge.EVENT_BUS.register(new ChunkEventHandler()); MinecraftForge.EVENT_BUS.register(new PlayerInteractionHandler()); MinecraftForge.EVENT_BUS.register(new AnvilCraftingHandler()); if (Loader.isModLoaded("MineTweaker3")) { MineTweakerAPI.registerClass(ItemHeat.class); MineTweakerAPI.registerClass(Loom.class); MineTweakerAPI.registerClass(Quern.class); MineTweakerAPI.registerClass(Barrel.class); MineTweakerAPI.registerClass(Anvil.class); MineTweakerAPI.registerClass(Knapping.class); } }
@Override public void init(FMLInitializationEvent event) { super.init(event); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockCapacitor), new ItemRendererCapacitor()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockDiode), new ItemRendererDiode()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockResistor), new ItemRendererResistor()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockSwitch), new ItemRendererSwitch()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockInvisTess), new ItemRendererInvisTess()); //MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockRFMeter), new ItemRendererRFMeter()); MinecraftForgeClient.registerItemRenderer(RFUContent.itemMaterialTess, new ItemRendererMaterialTess()); //MinecraftForgeClient.registerItemRenderer(RFUContent.itemMaterialDisplay, new ItemRendererMaterialDisplay()); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(RFUContent.blockTransistor), new ItemRendererTransistor()); FMLCommonHandler.instance().bus().register(new KeyInputHandler()); KeyBindings.init(); }
@Override public void init(FMLInitializationEvent e) { super.init(e); Register.registerGlobalEntityID(EntityLaser.class, "laser"); Register.registerEntityRenderingHandler(EntityLaser.class, new RenderLaser()); Register.registerItemRenderer(RorysMod.items.rifle1, new RenderRifle()); Register.registerItemRenderer(RorysMod.items.rifle2, new RenderRifle()); Register.registerItemRenderer(RorysMod.items.rifle3, new RenderRifle()); Register.registerItemRenderer(RorysMod.items.rifle4, new RenderRifle()); Register.registerItemRenderer(RorysMod.items.rifle5, new RenderRifle()); TileEntitySpecialRenderer render = new RenderRifleTable(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRifleTable.class, render); Register.registerItemRenderer(Item.getItemFromBlock(RorysMod.blocks.upgradeTable), new ItemRender(render, new TileEntityRifleTable())); render = new RenderPoweredChest(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPoweredChest.class, render); FMLInterModComms.sendMessage("Waila", "register", WailaConfig.class.getName() + ".callbackRegister"); }
@Override public void init(FMLInitializationEvent event) { Register.addShapedRecipie(new ItemStack(steelBlock), new Object[] { "sss", "sss", "sss", 's', "ingotSteel" }); for (int id = 0; id < ((BlockBaseMeta) testingWall).getMetaSize(); id++) { ItemStack dye = new ItemStack(Items.dye, 1, 15 - id); ItemStack currentBlock = new ItemStack(testingWall, 1, id); Register.addShapedRecipie(currentBlock, new Object[] { " i ", "idi", " i ", 'i', "ingotSteel", 'd', dye }); Register.addShapelessRecipie(currentBlock, new Object[] { "testingWall", dye, dye, dye }); } Register.addShapedRecipie(new ItemStack(upgradeTable), new Object[] { "sss", "ici", "iti", 's', "plateSteel", 'i', "ingotIron", 'c', "cpu", 't', Blocks.crafting_table }); Register.addShapedRecipie(new ItemStack(bluePrint, 1, 0), new Object[] { " l ", "lbl", " l ", 'b', "testingWall", 'l', new ItemStack(Items.dye, 1, 4) }); Register.addShapedRecipie(new ItemStack(bluePrint, 1, 1), new Object[] { " d ", " b ", " ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) }); Register.addShapedRecipie(new ItemStack(bluePrint, 1, 2), new Object[] { " d", " b ", " ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) }); Register.addShapedRecipie(new ItemStack(bluePrint, 1, 3), new Object[] { " ", " bd", " ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) }); Register.addShapedRecipie(new ItemStack(bluePrint, 1, 4), new Object[] { " ", " b ", " d", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) }); Register.addShapedRecipie(new ItemStack(bluePrint, 1, 0), new Object[] { "d ", " b ", " ", 'b', "bluePrint", 'd', new ItemStack(Items.dye, 1, 15) }); Register.addShapelessRecipie(new ItemStack(poweredChest), new Object[] { Blocks.chest, Items.redstone, Blocks.tripwire_hook }); Register.addShapedRecipie(new ItemStack(renamer), new Object[] { " n ", "gmg", "csc", 'n', Items.name_tag, 'g', "blockGlass", 'm', IC2Items.getItem("machine"), 'c', IC2Items.getItem("coil"), 's', "plateSteel" }); Register.addShapedRecipie(new ItemStack(solderBlock), new Object[] { "sss", "sss", "sss", 's', "ingotSolder" }); }
@EventHandler public void init(FMLInitializationEvent event) { RMLog.info("Registering Recipes"); blocks.init(event); items.init(event); achievements.init(event); RMLog.info("Registering everything else"); Register.registerGUI(new GuiHandler()); registerEventHandlers(); registerTileEntities(); registerModEntities(); proxy.init(event); }
@EventHandler public void init(FMLInitializationEvent event) { FairyEventListener listener = new FairyEventListener(); MinecraftForge.EVENT_BUS.register(listener); proxy.initEntities(); LOGGER.debug("Registered entities"); proxy.initChannel(listener); LOGGER.debug("Registered channel"); /* FMLCommonHandler.instance().bus().register(this); LOGGER.debug("Registered events"); */ proxy.initGUI(); LOGGER.debug("Registered GUI"); LOGGER.info("Loaded version %s", Version.VERSION); }
@EventHandler public void init(FMLInitializationEvent event) { proxy.load(); this.registerEntities(); // TODO Register Planets: ------------------------------- TrappistOnePlanets.init(); TPCreativeTabs.TPBlocksTab = new CreativeTabGC(CreativeTabs.getNextID(), "TPBlocks", Item.getItemFromBlock(Blocks.grass), 0); TPCreativeTabs.TPItemsTab = new CreativeTabGC(CreativeTabs.getNextID(), "TPItems", TPItems.itemAlienGel, 0); TPCreativeTabs.TPArmorTab = new CreativeTabGC(CreativeTabs.getNextID(), "TPArmor", Items.diamond_helmet, 0); }
@Override public void init(final @Nonnull FMLInitializationEvent event) { super.init(event); new CoreHandler().init(); ScreenShotShieldRegistery.register(new DefaultSSShield()); ScreenShotShieldRegistery.register(new FileSSShield()); ModListShieldRegistery.register(new DefaultMLShield()); ModListShieldRegistery.register(new FileMLShield()); }
@EventHandler public void init(FMLInitializationEvent event) { PacketHandler.init(); proxy.registerEventHandlers(); }
@EventHandler public void initialize(FMLInitializationEvent e) { // Register packets in the TFC PacketPipeline TerraFirmaCraft.PACKET_PIPELINE.registerPacket(InitClientWorldPacket.class); // Register the player tracker FMLCommonHandler.instance().bus().register(new ModPlayerTracker()); // Register the tool classes proxy.registerToolClasses(); // Register Crafting Handler FMLCommonHandler.instance().bus().register(new CraftingHandler()); // Register the Chunk Load/Save Handler MinecraftForge.EVENT_BUS.register(new ChunkEventHandler()); // Register all the render stuff for the client proxy.registerRenderInformation(); FluidList.registerFluidContainers(); ModRecipes.initialise(); // Register WAILA classes proxy.registerWailaClasses(); proxy.hideNEIItems(); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.registerNetworkStuff(); NetworkRegistry.INSTANCE.registerGuiHandler(this, new TechnicalGuiHandler()); TechnicalItem.removeVanillaRecipes(); Recipes.init(); FMLCommonHandler.instance().bus().register(new EventListener()); radioactivityPotion = (new PotionTechnical(radioactivityPotionId, true, 0)).setIconIndex(0, 0).setPotionName("potion.radioactivityPotion"); TechnicalAchievement.init(); AchievementPage.registerAchievementPage(technicalAchievementPage); }
@EventHandler public void init(FMLInitializationEvent event) { long time = System.nanoTime(); ContentRegistry.init(); FMLCommonHandler.instance().bus().register(this); NetworkRegistry.INSTANCE.registerGuiHandler(OpenSensors.instance, new GUIHandler()); logger.info("Finished init in %d ms", (System.nanoTime() - time) / 1000000); }
@Override public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(ThaumOresMod.events); FMLCommonHandler.instance().bus().register(ThaumOresMod.events); if (TOConfig.generalAngryPigs) ReactionUtils.addBlockToPigAngryList(TOBlocks.netherrackInfusedOre, OreDictionary.WILDCARD_VALUE); }
@EventHandler public void init(FMLInitializationEvent event) { GameRegistry.registerWorldGenerator(new ProspectingWorldGen(), 1000); GameRegistry.addRecipe(new ItemStack(ProspectingItems.prospecting_pan), new Object[] {"s s", " s ", 's', Blocks.stone_slab}); GameRegistry.addRecipe(new ItemStack(ProspectingItems.prospecting_pick), new Object[] {"iis", " s", 'i', Items.iron_ingot, 's', Items.stick}); GameRegistry.addRecipe(new ItemStack(ProspectingItems.sifting_pan), new Object[] {"s s", "s#s", "s#s", 's', Items.stick, '#', Items.string}); }
@EventHandler public void init( FMLInitializationEvent event ) { FMLCommonHandler.instance().bus().register( AdminLogonErrors ); FMLCommonHandler.instance().bus().register( LootGroupHandler ); MinecraftForge.EVENT_BUS.register( LootGroupHandler ); NetworkRegistry.INSTANCE.registerGuiHandler( this, new GuiHandler() ); }
@Override public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(new TickHandlerClient()); MarsModuleClient.vineRenderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererCavernousVines(MarsModuleClient.vineRenderID)); MarsModuleClient.eggRenderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererEgg(MarsModuleClient.eggRenderID)); MarsModuleClient.treasureRenderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererTier2TreasureChest(MarsModuleClient.treasureRenderID)); MarsModuleClient.machineRenderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererMachine(MarsModuleClient.machineRenderID)); MarsModuleClient.renderIdHydrogenPipe = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererHydrogenPipe(MarsModuleClient.renderIdHydrogenPipe)); }
@Override public void init(FMLInitializationEvent event) { super.init(event); for (IPlanetsModuleClient module : GalacticraftPlanets.clientModules.values()) { module.init(event); } }
@Override public void init(FMLInitializationEvent event) { AsteroidsModuleClient.walkwayRenderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererWalkway(AsteroidsModuleClient.walkwayRenderID)); AsteroidsModuleClient.treasureChestID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(new BlockRendererTier3TreasureChest(AsteroidsModuleClient.treasureChestID)); AsteroidsEventHandlerClient clientEventHandler = new AsteroidsEventHandlerClient(); FMLCommonHandler.instance().bus().register(clientEventHandler); MinecraftForge.EVENT_BUS.register(clientEventHandler); FluidTexturesGC.init(); }
@Override public void init(FMLInitializationEvent event) { Class[][] commonTypes = { { MusicTicker.MusicType.class, ResourceLocation.class, int.class, int.class }, }; MUSIC_TYPE_MARS = EnumHelper.addEnum(commonTypes, MusicTicker.MusicType.class, "MARS_JC", new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "galacticraft.musicSpace"), 12000, 24000); ClientProxyCore.registerHandlers(); ClientProxyCore.registerTileEntityRenderers(); ClientProxyCore.registerBlockHandlers(); ClientProxyCore.setupCapes(); }
@Subscribe public void init(FMLInitializationEvent event) { if (CommonUtils.isClient()) ClientHandler.load(); ServerHandler.load(); }
@Subscribe public void init(FMLInitializationEvent event) { if (event.getSide().isClient()) { if (config.getTag("checkUpdates").getBooleanValue(true)) CCUpdateChecker.updateCheck(getModId()); notificationCheck(); FMLCommonHandler.instance().bus().register(new CCCEventHandler()); } }
public static void init(FMLInitializationEvent event) { if(Loader.isModLoaded("Waila")) { new CompatModuleWaila().init(event); } if(Loader.isModLoaded("NotEnoughItems")) { } }
static void registerInit(@SuppressWarnings("UnusedParameters") FMLInitializationEvent event) { //TileEntityの登録 ============================================================================================= GameRegistry.registerTileEntity(TileEntityClayCrucible.class, "tileClayCrucible"); GameRegistry.registerTileEntity(TileEntityClayCrucibleHeater.class, "tileClayCrucibleHeater"); //WorldGeneratorの登録 ========================================================================================= GameRegistry.registerWorldGenerator(new OreGenerator(), 2); //チャンク生成イベントのフック MinecraftForge.EVENT_BUS.register(new AMMStructureEventHandler()); MapGenStructureIO.registerStructure(StructureTestStart.class, "Test"); MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest1.class, "Test1"); MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest2.class, "Test2"); MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest3.class, "Test3"); MapGenStructureIO.func_143031_a(StructureTestStart.ComponentTest4.class, "Test4"); MapGenStructureIO.registerStructure(StructureTiamatStart.class, "TiamatComet"); MapGenStructureIO.func_143031_a(ComponentTiamatCenter.class, "TiamaitCometCenter"); MapGenStructureIO.func_143031_a(ComponentTiamatCenterLine.class, "TiamatCometCenterLine"); EntityRegistry.registerModEntity(EntityHoeHoeMan.class, "HoeHoeMan", 0, AntiMatterModCore.MOD_ID, 250, 1, false);//中ボスの追加 if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { RenderingRegistry.registerEntityRenderingHandler(EntityHoeHoeMan.class, new RenderHoeHoeMan()); } //村のチェストの中身============================================================================================ //ChestGenHooks.addItem(ChestGenHooks.VILLAGE_BLACKSMITH, new WeightedRandomChestContent(ingot_01,1,1,5,5)); //ChestGenHooks.addItem(ChestGenHooks.VILLAGE_BLACKSMITH, new WeightedRandomChestContent(ingot_01,2,1,5,5)); ChestGenHooks village =ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH); village.setMax(village.getMax()+10); village.setMin(village.getMin()+10); }
@Mod.EventHandler public void onInit(FMLInitializationEvent e){ /* REGISTERS ALL COMMON THINGS SO FOR BOTH SERVER AND CLIENT... */ LOTRAddonsItems.registerRings(); LOTRAddonsBlocks.registerBlocks(); LOTRAddonsEntities.registerEntities(); NetworkRegistry.INSTANCE.registerGuiHandler(LOTRAddons.lotrAddons, new GuiHandler()); }
/** * レシピを登録 * * @param event FMLイベント */ public static void RecipeRegisterInit(FMLInitializationEvent event) { //レシピの登録 ================================================================================================= /*耐久値有のRecipeを登録するときはメタ値のところにOreDictionary.WILDCARD_VALUE * レシピで鉱石辞書の使用の際は、 * 登録名を入れるところに * OreDictionaryRegister.plateIron や * OreDictionaryRegister.craftingTookWrench; * で、RecipeRegisterクラスのメソッド shapedOreRecipe や shapelessOreRecipe * を通すこと * IDEAなので候補が出てきます。 * その方が効率いいでしょ */ GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_01, 1, 0), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_01, 1, 0)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_01, 1, 1), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_01, 1, 1)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_01, 1, 2), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_01, 1, 2)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_01, 1, 3), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_01, 1, 3)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_01, 1, 4), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_01, 1, 4)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_01, 1, 5), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_01, 1, 5)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.crystalblock_02, 1, 0), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.crystal_02, 1, 0)); GameRegistry.addRecipe(new ItemStack(AntiMatterModRegistry.powderblock_01, 1, 0), "AAA", "AAA", "AAA", 'A', new ItemStack(AntiMatterModRegistry.powder_01, 1, 0)); }
@Mod.EventHandler public void init(FMLInitializationEvent event) { registrant = new Registrant(32); MinecraftForge.EVENT_BUS.register(this); FMLCommonHandler.instance().bus().register(this); }
@EventHandler public void init(FMLInitializationEvent event) throws Exception { if(event.getSide().isServer()) modpack = new Modpack(logger, solderConfig, gson); if(event.getSide().isServer() && solderConfig.isEnabled()) { logger.info("Loading mod MinecraftSolder"); ResourceConfig config = new ResourceConfig() .packages("it.admiral0") .register(new AbstractBinder() { @Override protected void configure() { bind(solderConfig); bind(Loader.instance()); bind(modpack); bind(gson); } }); HttpServer server = GrizzlyHttpServerFactory.createHttpServer(solderConfig.getBaseUri(), config); server.getServerConfiguration().addHttpHandler( new StaticHttpHandler(modpack.getSolderCache().toAbsolutePath().toString()), "/download" ); server.start(); logger.info("Server running on " + solderConfig.getBaseUri().toString()); }else{ logger.info("Mod is disabled."); } }
@Override public void init(final @Nonnull FMLInitializationEvent event) { super.init(event); // Replace Sign Renderer ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySign.class, Client.renderer); MinecraftForgeClient.registerItemRenderer(Items.sign, new CustomItemSignRenderer()); // Event Register Client.handler.init(); ClientCommandHandler.instance.registerCommand(Client.rootCommand); }
public void init(FMLInitializationEvent e) { wrapper = NetworkRegistry.INSTANCE.newSimpleChannel("OpenTeleporter"); GameRegistry.registerBlock(new BlockTeleporter(), "Teleporter"); GameRegistry.registerTileEntity(TileEntityTeleporter.class, "TileEntityTeleporter"); wrapper.registerMessage(PacketPlayerPosition.Handler.class, PacketPlayerPosition.class, 0, Side.CLIENT); wrapper.registerMessage(PacketTeleporter.Handler.class, PacketTeleporter.class, 1, Side.CLIENT); }
/** * {@link RecipeRegister#RecipeRegisterInit(FMLInitializationEvent)}が実行される前に実行されるレシピ消去 * * @param event FMLイベント */ public static void beforeRemoveRecipeinit(FMLInitializationEvent event) { //Recipe削除 =================================================================================================== RecipeRemover.removeRecipe(Items.stick);//木の棒 RecipeRemover.removeShapedRecipe(new ItemStack(Items.bucket), "I I", " I ", 'I', Items.iron_ingot);//バケツ RecipeRemover.removeShapedRecipe(new ItemStack(Items.cauldron, 1), "# #", "# #", "###", '#', Items.iron_ingot);//大釜 }
/** * This is the second pass of logic in this mod. */ @Mod.EventHandler public void init(FMLInitializationEvent event) { InitEvent e; e = new InitEvent(); e.Go(event); }
public void init(FMLInitializationEvent event){ GameRegistry.registerFuelHandler(new FuelHandler()); GameRegistry.registerItem(LOTRRItems.ringGold, "ringgold"); GameRegistry.registerItem(LOTRRItems.ringBronze, "ringbronze"); GameRegistry.registerItem(LOTRRItems.ringDwarven, "ringdwarven"); GameRegistry.registerItem(LOTRRItems.ringElven, "ringelven"); GameRegistry.registerItem(LOTRRItems.ringEmerald, "ringemerald"); GameRegistry.registerItem(LOTRRItems.ringMithril, "ringmithril"); GameRegistry.registerItem(LOTRRItems.ringGalvorn, "ringgalvorn"); GameRegistry.registerItem(LOTRRItems.ringIron, "ringiron"); GameRegistry.registerItem(LOTRRItems.ringSilver, "ringsilver"); GameRegistry.registerItem(LOTRRItems.ringNarya, "ringnarya"); GameRegistry.registerItem(LOTRRItems.ringNenya, "ringnenya"); GameRegistry.registerItem(LOTRRItems.ringVilya, "ringvilya"); GameRegistry.registerItem(LOTRRItems.ringDwarvenBlue, "ringdwarvenblue"); GameRegistry.registerItem(LOTRRItems.ringDwarvenGreen, "ringdwarvengreen"); GameRegistry.registerItem(LOTRRItems.ringDwarvenRed, "ringdwarvenred"); GameRegistry.registerItem(LOTRRItems.ringDwarvenYellow, "ringdwarvenyellow"); GameRegistry.registerBlock(LOTRRBlocks.blockRingForge, "ringforge"); GameRegistry.registerTileEntity(RingForgeEntity.class, "RingForge"); FMLCommonHandler.instance().bus().register(new CustomKeyHandler()); GameRegistry.addRecipe(new ItemStack(genericRing), new Object[]{ "AAA", "AAA", "AAA", 'A', Items.gold_ingot }); }