@Init public void init(FMLInitializationEvent event) { try { Class mystcraftApi = Class.forName("xcompwiz.mystcraft.api.APICallHandler"); Class ageSymbol = Class.forName("xcompwiz.mystcraft.api.symbol.AgeSymbol"); Class oreSymbol = Class.forName("shadow.mods.metallurgy.mystcraft.OreSymbol"); Constructor constructor = oreSymbol.getConstructor(new Class[] {MetalSet.class}); Method registerSymbol = mystcraftApi.getMethod("registerSymbol", new Class[] {ageSymbol}); registerSymbol.invoke(mystcraftApi, constructor.newInstance(ores)); } catch (Exception e) { } GameRegistry.registerBlock(PreciousChest, FC_ChestItemBlock.class); GameRegistry.registerTileEntity(FC_TileEntityChest.class, "PreciousChest"); GameRegistry.registerBlock(Mint); GameRegistry.registerTileEntity(FM_TileEntityMint.class, "Mint"); GameRegistry.registerBlock(MintStorage); GameRegistry.registerTileEntity(FM_TileEntityMintStorage.class, "MintStorage"); if (ConfigPrecious.tradesEnabled) for (int i = 0; i < 5; i++) VillagerRegistry.instance().registerVillageTradeHandler(i, new PreciousTradeHandler()); NetworkRegistry.instance().registerGuiHandler(instance, proxy); ((CreativeTabMetallurgy) creativeTab).setTabIconItemIndex(ores.Helmet[2].shiftedIndex); alloys.load(); ores.load(); proxy.addNames(); proxy.registerTileEntitySpecialRenderer(); proxy.registerRenderInformation(); registerWithApi(); }
@EventHandler public void init(FMLInitializationEvent event) throws Exception { packetPipeline.registerMessage( AnvilTechniquePacket.Handler.class, AnvilTechniquePacket.class, 0, Side.SERVER); packetPipeline.registerMessage( ChunkPutNbtPacket.Handler.class, ChunkPutNbtPacket.class, 1, Side.CLIENT); packetPipeline.registerMessage( ChunkRemoveNbtPacket.Handler.class, ChunkRemoveNbtPacket.class, 2, Side.CLIENT); packetPipeline.registerMessage( SoundEffectToServerPacket.Handler.class, SoundEffectToServerPacket.class, 3, Side.SERVER); packetPipeline.registerMessage( MechanicalNetworkNBTPacket.ClientHandler.class, MechanicalNetworkNBTPacket.class, 4, Side.CLIENT); packetPipeline.registerMessage( StartMeteorShowerPacket.ClientHandler.class, StartMeteorShowerPacket.class, 5, Side.CLIENT); packetPipeline.registerMessage( WorldDataPacket.ClientHandler.class, WorldDataPacket.class, 6, Side.CLIENT); packetPipeline.registerMessage( CarpentryTechniquePacket.Handler.class, CarpentryTechniquePacket.class, 7, Side.SERVER); BlocksVC.init(); ItemsVC.init(); AchievementsVC.init(); FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); proxy.registerTileEntities(); NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); System.out.println("vcraft has init."); GameRegistry.registerWorldGenerator(new WorldGenDeposits(), 4); WorldType.DEFAULT = WorldTypeVC.DEFAULT; WorldType.FLAT = WorldTypeVC.FLAT; // DimensionManager.unregisterDimension(-1); DimensionManager.unregisterDimension(0); DimensionManager.unregisterDimension(1); // DimensionManager.unregisterProviderType(-1); DimensionManager.unregisterProviderType(0); DimensionManager.unregisterProviderType(1); DimensionManager.registerProviderType(0, WorldProviderVC.class, true); DimensionManager.registerProviderType(1, WorldProviderVC.class, false); // DimensionManager.registerDimension(-1, -1); DimensionManager.registerDimension(0, 0); DimensionManager.registerDimension(1, 1); proxy.init(event); }
@EventHandler public void postInit(FMLPostInitializationEvent e) { // The postInit Handler is called at the very end. // Its used to communicate with other mods and adjust your setup based on this. System.out.println(MODNAME + " Version " + VERSION + " Loaded."); proxy.postInit(e); }
@Override public void init(FMLInitializationEvent event) { super.init(event); LegacyBlocks.Render(); LegacyItems.Render(); LegacyTools.Render(); }
@EventHandler public void init(FMLInitializationEvent event) { PacketDispatcher.registerPackets(); proxy.init(event); GameRegistry.addShapelessRecipe(new ItemStack(itemEmptyAtlas), Items.book, Items.compass); RecipeSorter.register( "antiqueatlas:atlascloning", RecipeAtlasCloning.class, SHAPELESS, "after:minecraft:shapeless"); GameRegistry.addRecipe(new RecipeAtlasCloning()); RecipeSorter.register( "antiqueatlas:atlascombining", RecipeAtlasCombining.class, SHAPELESS, "after:minecraft:shapeless"); RecipeAtlasCombining recipeCombining = new RecipeAtlasCombining(); GameRegistry.addRecipe(recipeCombining); FMLCommonHandler.instance().bus().register(recipeCombining); MinecraftForge.EVENT_BUS.register(extBiomeData); FMLCommonHandler.instance().bus().register(extBiomeData); MinecraftForge.EVENT_BUS.register(globalMarkersData); FMLCommonHandler.instance().bus().register(globalMarkersData); MinecraftForge.EVENT_BUS.register(new DeathWatcher()); MinecraftForge.EVENT_BUS.register(new VillageWatcher()); MinecraftForge.EVENT_BUS.register(new NetherFortressWatcher()); MinecraftForge.EVENT_BUS.register(new NetherPortalWatcher()); }
@Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); registerKeyBindings(); ModelLoader.setCustomModelResourceLocation(MeleeCore.meleeCore, 0, Refs.modelResourceLocation); ModelLoaderRegistry.registerLoader(new ItemCoreModelLoader()); }
@EventHandler public void init(FMLInitializationEvent e) { // The init Handler is called after the preInit Handler. // In this method we can build up data structures, add Crafting Recipes and register new // handler. System.out.println("Called method: FMLInitializationEvent"); proxy.init(e); }
@EventHandler public void preInit(FMLPreInitializationEvent e) { // The preInit Handler is called at the very beginning of the startup routine. // In this method we should read your config file, create Blocks, Items, etc. and register them // with the GameRegistry. System.out.println(MODNAME + " Version " + VERSION + " Loading."); proxy.preInit(e); }
@Init public void load(FMLInitializationEvent event) { proxy.registerRenderers(); ModItems.init(); ModBlocks.init(); GameRegistry.registerWorldGenerator(new LightWorldGenerator()); }
@Init public void init(FMLInitializationEvent evt) { proxy.registerRenderInformation(); addBlocks(); addRecipes(); addTileEntities(); addGUIs(); }
@Override public void registerHandlers() { super.registerHandlers(); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityWormhole.class, new TileEntityWormholeRenderer()); RenderingRegistry.registerEntityRenderingHandler( EntitySpawnerFireball.class, new RenderFireball(4.0F)); }
@Override public void init() { super.init(); BHH_Blocks.registerRenderBlocks(); BHH_Items.registerRenderItems(); RenderingRegistry.registerEntityRenderingHandler( EntityNPC.class, new RenderNPC(new ModelNPC(), 0.5F)); }
@EventHandler public void postInit(FMLPostInitializationEvent evt) { ConfigHandler.configure(Settings.CONFIGURATION, "resonantinduction"); // Generate Resources ResourceGenerator.generateOreResources(); proxy.postInit(); Settings.CONFIGURATION.save(); }
@Override public void registerRenderers() { super.registerRenderers(); while (scoopRender.size() > 0) MinecraftForgeClient.registerItemRenderer(scoopRender.dequeue(), ItemRendererScoop$.MODULE$); NetworkRegistry.INSTANCE.registerGuiHandler( Reference.MOD_ID, NearbyMobFinderGUIHandler$.MODULE$); }
@Override public void preInit() { super.preInit(); EventUtil.register(ClientTimerHandler.INSTANCE, EventUtil.Type.BOTH); File file = new File(Subsistence.configPath + "foliage.json"); if (file.exists()) { FoliageHandler.initialize(file); } else { FoliageHandler.initialize(null); } AdvancedModelLoader.registerModelHandler(new FixedTechneModelLoader()); // TILE ClientRegistry.bindTileEntitySpecialRenderer(TileTable.class, new RenderTileTable()); ClientRegistry.bindTileEntitySpecialRenderer(TileSieveTable.class, new RenderTileSieveTable()); ClientRegistry.bindTileEntitySpecialRenderer( TileSinteringOven.class, new RenderTileSinteringOven()); ClientRegistry.bindTileEntitySpecialRenderer(TileHammerMill.class, new RenderTileHammerMill()); ClientRegistry.bindTileEntitySpecialRenderer(TileHandCrank.class, new RenderTileCrank()); ClientRegistry.bindTileEntitySpecialRenderer( TileKineticCrank.class, new RenderTileKineticCrank()); ClientRegistry.bindTileEntitySpecialRenderer(TileWaterMill.class, new RenderTileWaterMill()); ClientRegistry.bindTileEntitySpecialRenderer(TileKiln.class, new RenderTileKiln()); ClientRegistry.bindTileEntitySpecialRenderer(TileMetalPress.class, new RenderTileMetalPress()); ClientRegistry.bindTileEntitySpecialRenderer( TileSpawnMarker.class, new RenderTileSpawnMarker()); ClientRegistry.bindTileEntitySpecialRenderer(TileMetalShaft.class, new RenderTileMetalShaft()); ClientRegistry.bindTileEntitySpecialRenderer(TileCompost.class, new RenderTileCompost()); ClientRegistry.bindTileEntitySpecialRenderer(TileBarrel.class, new RenderTileBarrel()); // ITEM MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.table), new RenderItemTable()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.tableSieve), new RenderItemSieveTable()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.sinteringOven), new RenderItemSinteringOven()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.hammerMill), new RenderItemHammerMill()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.kineticCrank), new RenderItemKineticCrank()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.kiln), new RenderItemKiln()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.metalPress), new RenderItemMetalPress()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.spawnMarker), new RenderItemSpawnMarker()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.compost), new RenderItemCompost()); MinecraftForgeClient.registerItemRenderer( Item.getItemFromBlock(SubsistenceBlocks.barrel), new RenderItemBarrel()); MinecraftForgeClient.registerItemRenderer( SubsistenceItems.barrelLid, new RenderItemBarrelLid()); }
@EventHandler public void init(FMLInitializationEvent event) { network = new NetworkChannelHandler(); channels = NetworkRegistry.INSTANCE.newChannel("Redux2", network, new PacketHandler()); network.addDiscriminator(0, PacketConveyorBelt.class); proxy.initRenderers(); GameRegistry.registerTileEntity(TileConveyorBelt.class, "conveyorBelt"); }
@Override public void init(FMLInitializationEvent event) { super.init(event); weaponHandler.registerWeapon(MatterOverdriveItems.phaserRifle); weaponHandler.registerWeapon(MatterOverdriveItems.phaser); weaponHandler.registerWeapon(MatterOverdriveItems.omniTool); MatterOverdriveGuides.registerGuideElements(event); }
@EventHandler public void init(FMLInitializationEvent evt) { // Load Languages ResonantInduction.LOGGER.fine( "Languages Loaded:" + LanguageUtility.loadLanguages(Reference.LANGUAGE_DIRECTORY, Reference.LANGUAGES)); // Set Mod Metadata Settings.setModMetadata(metadata, ID, NAME); proxy.init(); }
@EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); ItemsVC.initTabIcons(); DynTreeGenerators.initGenerators(); Recipes.addRecipes(); EnumAnvilRecipe.registerRecipes(); EnumCarpentryRecipes.registerRecipes(); }
@Override public void Init() { super.Init(); for (final EnumCoinValue value : EnumCoinValue.values()) { final String itemModelName = value.getTextureName(); final ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation(CashCraft.modAsset(itemModelName), "inventory"); Minecraft.getMinecraft() .getRenderItem() .getItemModelMesher() .register(CashCraftItems.itemCoin, value.getMetadata(), itemModelResourceLocation); } }
@EventHandler public void init(FMLInitializationEvent event) { IC2NuclearControl.instance.screenManager = new ScreenManager(); initBlocks(); registerBlocks(); proxy.registerTileEntities(); CrossModLoader.init(); if (Loader.isModLoaded("OpenComputers")) crossOC = new CrossOpenComputers(); // Registers waila stuff // FMLInterModComms.sendMessage("Waila", "register", // "shedar.mods.ic2.nuclearcontrol.crossmod.waila.CrossWaila.callbackRegister"); // CrossBigReactors.doStuff(); // CrossAppeng.RegistrationCheck(); }
@Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); Item item = Item.getItemFromBlock(CustomModelBlock.instance); ModelLoader.setCustomModelResourceLocation(item, 0, itemLocation); ModelLoader.setCustomStateMapper( CustomModelBlock.instance, new StateMapperBase() { protected ModelResourceLocation getModelResourceLocation(IBlockState p_178132_1_) { return blockLocation; } }); MinecraftForge.EVENT_BUS.register(BakeEventHandler.instance); }
@Init public void load(FMLInitializationEvent event) { NetworkRegistry.instance().registerGuiHandler(this, guiHandler); proxy.registerRenderers(); registerBlocks(); registerFuel(); registerItems(); registerRecipes(); registerOres(); registerTileEntities(); proxy.registerTextureFX(); registerEntities(); GameRegistry.registerWorldGenerator(new WorldGenerator()); }
@EventHandler public void preInit(FMLPreInitializationEvent evt) { ResonantInduction.LOGGER.setParent(FMLLog.getLogger()); NetworkRegistry.instance().registerGuiHandler(this, proxy); Modstats.instance().getReporter().registerMod(this); Settings.CONFIGURATION.load(); // Register Forge Events MinecraftForge.EVENT_BUS.register(ResourceGenerator.INSTANCE); MinecraftForge.EVENT_BUS.register(new TextureHookHandler()); blockMachinePart = contentRegistry.createBlock(BlockMachineMaterial.class, ItemBlockMetadata.class); /** Melting dusts */ blockDust = contentRegistry .createBlock("dust", BlockDust.class, null, TileDust.class) .setCreativeTab(null); blockRefinedDust = contentRegistry .createBlock("refinedDust", BlockDust.class, null, TileDust.class) .setCreativeTab(null); // Items itemRubble = new ItemOreResource(Settings.getNextItemID("oreRubble"), "oreRubble"); itemDust = new ItemOreResource(Settings.getNextItemID("oreDust"), "oreDust"); itemRefinedDust = new ItemOreResource(Settings.getNextItemID("oreRefinedDust"), "oreRefinedDust"); itemBucketMixture = new ItemOreResourceBucket(Settings.getNextItemID("bucketMixture"), "bucketMixture", false); itemBucketMolten = new ItemOreResourceBucket(Settings.getNextItemID("bucketMolten"), "bucketMolten", true); itemBiomass = contentRegistry.createItem(ItemBiomass.class); GameRegistry.registerItem(itemRubble, itemRubble.getUnlocalizedName()); GameRegistry.registerItem(itemDust, itemDust.getUnlocalizedName()); GameRegistry.registerItem(itemRefinedDust, itemRefinedDust.getUnlocalizedName()); GameRegistry.registerItem(itemBucketMixture, itemBucketMixture.getUnlocalizedName()); GameRegistry.registerItem(itemBucketMolten, itemBucketMolten.getUnlocalizedName()); // Already registered with ContentRegistry // GameRegistry.registerTileEntity(TileMaterial.class, "ri_material"); GameRegistry.registerTileEntity(TileFluidMixture.class, "ri_fluid_mixture"); proxy.preInit(); TabRI.ITEMSTACK = new ItemStack(blockMachinePart); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { Log.setModID(ID); proxy.preInit(event); settings.load(new File(proxy.configDir, "settings.cfg")); itemAtlas = (ItemAtlas) new ItemAtlas(settings).setUnlocalizedName("antiqueAtlas"); itemEmptyAtlas = (ItemEmptyAtlas) new ItemEmptyAtlas() .setUnlocalizedName("emptyAntiqueAtlas") .setCreativeTab(CreativeTabs.tabTools); GameRegistry.registerItem(itemAtlas, "antiqueAtlas"); GameRegistry.registerItem(itemEmptyAtlas, "emptyAntiqueAtlas"); }
@Override public void registerTileEntities(boolean b) { super.registerTileEntities(false); ClientRegistry.registerTileEntity(TEChest.class, "chest", new TESRChest()); ClientRegistry.registerTileEntity(TEIngotPile.class, "ingotPile", new TESRIngotPile()); ClientRegistry.registerTileEntity(TEFirepit.class, "TerraFirepit", new TESRFirepit()); ClientRegistry.registerTileEntity(TELoom.class, "Loom", new TESRLoom()); // ModLoader.registerTileEntity(TileEntityBarrel.class, "barrel", new // TileEntityBarrelRendererTFC()); ClientRegistry.registerTileEntity(TEPottery.class, "Pottery", new TESRPottery()); ClientRegistry.registerTileEntity(TEFoodPrep.class, "FoodPrep", new TESRFoodPrep()); ClientRegistry.registerTileEntity(TEBellows.class, "Bellows", new TESRBellows()); ClientRegistry.registerTileEntity(TEToolRack.class, "ToolRack", new TESRToolrack()); ClientRegistry.registerTileEntity(TEAnvil.class, "TerraAnvil", new TESRAnvil()); ClientRegistry.registerTileEntity(TEWorldItem.class, "worldItem", new TESRWorldItem()); ClientRegistry.registerTileEntity(TEQuern.class, "Quern", new TESRQuern()); ClientRegistry.registerTileEntity(TEGrill.class, "GrillTESR", new TESRGrill()); ClientRegistry.registerTileEntity(TESmokeRack.class, "SmokeRackTESR", new TESRSmokeRack()); ClientRegistry.registerTileEntity(TEHopper.class, "HopperTESR", new TESRHopper()); }
@Override public void preInit() { super.preInit(); // Register coin / note variants ModelBakery.registerItemVariants( CashCraftItems.itemCoin, new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(0).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(1).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(2).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(3).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(4).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(5).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(6).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(7).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(8).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(9).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(10).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(11).getTextureName())), new ResourceLocation(CashCraft.modAsset(EnumCoinValue.byMetadata(12).getTextureName()))); }
@Override public void registerProxies() { super.registerProxies(); renderHandler = new RenderHandler( Minecraft.getMinecraft().theWorld, Minecraft.getMinecraft().getTextureManager()); androidHud = new GuiAndroidHud(Minecraft.getMinecraft()); keyHandler = new KeyHandler(); mouseHandler = new MouseHandler(); holoIcons = new HoloIcons(); weaponHandler = new ClientWeaponHandler(); questHud = new GuiQuestHud(); registerSubscribtions(); // region Render Handler Functions // region Create renderHandler.createBlockRenderers(); renderHandler.createTileEntityRenderers(MatterOverdrive.configHandler); renderHandler.createItemRenderers(); renderHandler.createEntityRenderers(); renderHandler.createBioticStatRenderers(); renderHandler.createStarmapRenderers(); renderHandler.createModels(); // endregion // region Register renderHandler.registerBlockRenderers(); renderHandler.registerTileEntitySpecialRenderers(); renderHandler.registerItemRenderers(); renderHandler.registerEntityRenderers(); renderHandler.registerBioticStatRenderers(); renderHandler.registerBionicPartRenderers(); renderHandler.registerStarmapRenderers(); // endregion // endregion MatterOverdrive.configHandler.subscribe(androidHud); }
@EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); // Block Registration GameRegistry.registerBlock(bauxite); GameRegistry.registerBlock(moonDust); GameRegistry.registerBlock(meteorite); GameRegistry.registerBlock(moonPortal); GameRegistry.registerBlock(moonRock); // Block Name Registration LanguageRegistry.addName(bauxite, "Bauxite"); LanguageRegistry.addName(moonDust, "Moon Dust"); LanguageRegistry.addName(meteorite, "Meteorite"); LanguageRegistry.addName(moonPortal, "Moon Portal"); LanguageRegistry.addName(moonRock, "Moon Rock"); // Item Name Registration LanguageRegistry.addName(aluminum, "Aluminum Ingot"); LanguageRegistry.addName(stainlessSteel, "Steel Ingot"); LanguageRegistry.addName(steelRod, "Steel Rod"); // Crafting Recipes GameRegistry.addRecipe( new ItemStack(steelRod, 8), new Object[] { " S ", " S ", " S ", 'S', stainlessSteel, }); GameRegistry.addSmelting(bauxite.blockID, new ItemStack(aluminum), 0.1f); GameRegistry.addSmelting(meteorite.blockID, new ItemStack(stainlessSteel), 0.5f); DimensionManager.registerProviderType(DimensionId, WorldProviderMoon.class, false); DimensionManager.registerDimension(DimensionId, DimensionId); GameRegistry.registerWorldGenerator(spacecraftGenerator); }
@Override public void setupConfig() { super.setupConfig(); Property Mag_Limit = config.get(Configuration.CATEGORY_GENERAL, "Mag_Limit", 5.0); Mag_Limit.comment = "Limit of magnitude can be seen on naked eye.\n" + "If you want to increase FPS, you can set this property a bit little (e.g. 0.3)\n" + "and FPS will be exponentially improved"; manager.Mag_Limit = (float) Mag_Limit.getDouble(5.0); Property turb = config.get(Configuration.CATEGORY_GENERAL, "Twinkling(Turbulance)", 0.3); turb.comment = "Degree of the twinkling effect of star.\n" + "It determines the turbulance of atmosphere, which actually cause the twinkling effect"; manager.Turb = (float) turb.getDouble(0.3); Property Moon_Frac = config.get(Configuration.CATEGORY_GENERAL, "Moon_Fragments_Number", 16); Moon_Frac.comment = "Moon is drawn with fragments\n" + "Less fragments will increase FPS, but the moon become more defective\n"; manager.ImgFrac = Moon_Frac.getInt(16); }