public static void init(FMLPreInitializationEvent event) { // Init boolean isRender = getRenderSetting(event.getSuggestedConfigurationFile()); mc = Minecraft.getMinecraft(); chatHandler = new ChatHandler(); entityKillHandler = new EntityKillHandler(); renderHandler = new RenderHandler(mc, isRender); keyInputHandler = new KeyInputHandler(renderHandler, event.getSuggestedConfigurationFile()); KeyBindler.init(); // Register handlers MinecraftForge.EVENT_BUS.register(chatHandler); MinecraftForge.EVENT_BUS.register(entityKillHandler); MinecraftForge.EVENT_BUS.register(renderHandler); FMLCommonHandler.instance().bus().register(keyInputHandler); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { config = new Configuration(event.getSuggestedConfigurationFile()); // gets default config file this.instance = this; FMLCommonHandler.instance().bus().register(worldgen); MinecraftForge.EVENT_BUS.register(worldgen); FMLCommonHandler.instance().bus().register(versionChecker); MinecraftForge.EVENT_BUS.register(versionChecker); FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); ClientCommandHandler.instance.registerCommand(new VersionCommand()); fluids.setupFluids(); fluids.setupFluidBlocks(); items.setupItems(); items.registerItems(); items.registerItemsOreDict(); blocks.setupBlocks(); blocks.registerBlocks(); blocks.registerBlocksOreDict(); blocks.setupHarvestLevels(); recipes.setupShapelessCrafting(); recipes.setupShapedCrafting(); recipes.setupSmelting(); worldgen.setupWorldgen(); mobs.setupMobs(); proxy.registerRenderers(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { // init block and item data BlockData.init(); ItemData.init(); // config ConfigData.init(); ConfigHandler.init(event.getSuggestedConfigurationFile()); ConfigData.load(); // modbase init VanillaData.init(); TextureMapper.init(); BlockCollector.init(); ItemCollector.init(); EntityData.init(); // create blocks BlockCollector.createBlocks(); ItemCollector.createItems(); EntityCollector.registerEntities(); // proxy proxy.init(); proxy.registerRenderers(); proxy.registerEvents(); Recipes.registerRecipes(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { config = new Configuration(event.getSuggestedConfigurationFile()); tabRu = new CreativeTabs(CreativeTabs.getNextID(), Reference.Mod.MODID) { // Creative tab @Override public Item getTabIconItem() { return ItemInit.itemPancake; } @Override public String getTranslatedTabLabel() { return "Random Utilities"; } }; // Registration ItemInit.init(); BlockInit.init(); RecipeInit.init(); MiscInit.init(); MiscInit.eventInit(); syncConfig(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { Config.initialize(event.getSuggestedConfigurationFile()); if (ENABLE) { MysticStonesTab = new CreativeTabs("MysticStonesTab") { @Override @SideOnly(Side.CLIENT) public int func_151243_f() { return 4; } @Override public Item getTabIconItem() { return Item.getItemFromBlock(MysticStones.reinforcedBricks); } }; planks = GameRegistry.registerBlock(new BlockPlanks(), ItemBlockMulti.class, "Planks", PLANK_TYPE); stones = GameRegistry.registerBlock( new BlockStones(), ItemBlockMulti.class, "Stones", STONE_TYPES); stoneBricks = GameRegistry.registerBlock( new BlockStoneBricks(), ItemBlockMulti.class, "StoneBricks", STONEBRICK_TYPES); reinforcedBricks = GameRegistry.registerBlock( new BlockReinforced(), ItemReinforced.class, "Reinforcedbricks"); RecipeHandler.craftPlanks(); RecipeHandler.craftStoneBricks(); RecipeHandler.craftReinforced(); RecipeHandler.craftElse(); GameRegistry.registerWorldGenerator(new WorldGeneratorStones(), 1); } }
@PreInit public void preInit(FMLPreInitializationEvent evt) { // This is new! put stuff here that you want to happen before the mods are loaded Configuration config = new Configuration(evt.getSuggestedConfigurationFile()); config.load(); // Block Ids 3041 - 3060 stonewallID = config.getBlock("Cobblestone Wall", 3041).getInt(); stonebrickwallID = config.getBlock("Stonebrick Wall", 3042).getInt(); crackedbrickwallID = config.getBlock("Cracked Stonebrick Wall", 3043).getInt(); mossbrickwallID = config.getBlock("Mossy Stonebrick Wall", 3044).getInt(); brickwallID = config.getBlock("Brick Wall", 3045).getInt(); LapiswallID = config.getBlock("Lapis Wall", 3046).getInt(); woodenwallID = config.getBlock("Wooden Wall", 3047).getInt(); sandstonewallID = config.getBlock("Sandstone Wall", 3048).getInt(); Stonebrick1ID = config.getBlock("Used for Texture 1", 3049).getInt(); Stonebrick2ID = config.getBlock("Used for Texture 2", 3050).getInt(); Stonebrick3ID = config.getBlock("Used for Texture 3", 3051).getInt(); Stonebrick4ID = config.getBlock("Used for Texture 4", 3052).getInt(); netherbrickID = config.getBlock("Nether Brick Wall", 3053).getInt(); // BloodstonebrickID = config.getBlock("Bloodstone brick Wall", 3054).getInt(); config.save(); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { GameRegistry.registerBlock(blockLeafAir, "BlockLeafAir"); ConfigurationHandler.init(event.getSuggestedConfigurationFile()); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent pEvent) { // コンフィグの解析・設定 configFile = pEvent.getSuggestedConfigurationFile(); Configuration lconf = new Configuration(configFile); lconf.load(); isDebugMessage = lconf.get("RefinedMilitaryShovelReplica", "isDebugMessage", true).getBoolean(true); lconf.save(); // アイテムの登録 fn_SS190 = new ItemSS190().setUnlocalizedName("ss19").setTextureName("mmm:SS190"); fn_fiveseven = new ItemFiveseveN().setUnlocalizedName("fiveseven").setTextureName("mmm:FiveSeven"); fn_p90 = new ItemP90().setUnlocalizedName("p90").setTextureName("mmm:P90"); GameRegistry.registerItem(fn_SS190, "SS190"); GameRegistry.registerItem(fn_fiveseven, "FiveseveN"); GameRegistry.registerItem(fn_p90, "P90"); // ((ItemGunsBase)fn_fiveseven).init(); // ((ItemGunsBase)fn_p90).init(); EntityRegistry.registerModEntity(EntityBulletBase.class, "BulletBase", 0, this, 120, 1, false); }
public static void init(FMLPreInitializationEvent event) { config = new Configuration(event.getSuggestedConfigurationFile()); for (int c = 0; c < biomeIDs.length; c++) { biomeIDs[c] = 185 + c; } try { config.load(); biomeIDs[0] = config.get("Biome IDs", "Default 1", 185).getInt(); biomeIDs[1] = config.get("Biome IDs", "Default 2", 186).getInt(); biomeIDs[2] = config.get("Biome IDs", "Default Snow", 187).getInt(); defaultGen = config.get("Generator", "default-setting", "SKYDIM#1").getString(); // if setting doesn't exists set to default if (GeneratorType.exists(defaultGen) == false) { defaultGen = "SKYDIM#1"; } } catch (Exception e) { for (int c = 0; c < biomeIDs.length; c++) { biomeIDs[c] = 185 + c; } } finally { if (config.hasChanged()) { config.save(); } } }
@EventHandler public static void preInit(FMLPreInitializationEvent event) { ConfigHandler.INSTANCE.initialize(event.getSuggestedConfigurationFile()); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); proxy.preInit(); itemRegistry.register(); blockRegistry.register(); entityRegistry.init(); proxy.registerRenderers(); enchantRegistry.init(); Achievements.initAchievements(); starRegistry.registerDefaultStars(); FMLInterModComms.sendMessage( "Waila", "register", ModProps.MAIN_PACKAGE + ".common.compat.waila.WailaCompat.load"); CompatRegistry.INSTANCE.registerCompat( RegisterTime.INIT, ModProps.MAIN_PACKAGE + ".common.compat.enderio.EnderIOCompat", "EnderIO"); }
public void handleConfiguration() { map = new HashMap<String, Integer>(); Configuration config = new Configuration(new File(PATH + event.getSuggestedConfigurationFile().getName())); config.load(); easyRecipes = config.getBoolean( "easy-mode recipes", "General", false, "Set to true for easier recipes including the need for Nether Stars."); altFireStarRecipe = config.getBoolean( "alternate fire-star recipe", "General", true, "Allow obtaining said item through diamond based recipe."); allowTickTorch = config.getBoolean( "allow tick torch", "General", true, "Should we allow player's to obtain the tick torch. NOTE: Setting to false makes it creative item only!"); debugMode = config.getBoolean( "debug-mode toggle,", "General", false, "Allows displaying of debugging info!"); config.save(); // initLists(); }
@EventHandler // used in 1.6.2 // @PreInit // used in 1.5.2 public void preInit(FMLPreInitializationEvent event) { // Stub Method Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); Property comment; jumpLimit = config.get("Vampire Configuration", "jumpLimit", 3.0).getDouble(3.0); comment = config.get("Vampire Configuration", "jumpLimit", 3.0); comment.comment = "A float on how high a vampire can reach. 1 = 100days = 15blocks. Default = 3"; singleplayerRitual = config.get("Vampire Configuration", "singleplayerRitual", true).getBoolean(true); comment = config.get("Vampire Configuration", "singleplayerRitual", true); comment.comment = "Can you perform the original ritual alone? Default = true"; allowOriginals = config.get("Vampire Configuration", "allowOriginals", true).getBoolean(true); comment = config.get("Vampire Configuration", "allowOriginals", true); comment.comment = "Are originals even allowed? Makes singleplayerRitual worthless if false. Default = true"; useFoodBar = config.get("Vampire Configuration", "useFoodBar", true).getBoolean(true); comment = config.get("Vampire Configuration", "useFoodBar", true); comment.comment = "Should the food bar represent blood left. Default = true"; // boolean = config.get("Vampire Configuration", "singleplayerRitual", true).getBoolean(true); suffocateOnly = config.get("Vampire Configuration", "suffocateOnly", true).getBoolean(true); comment = config.get("Vampire Configuration", "suffocateOnly", true); comment.comment = "In order to become a vampire after being fed blood does the player turn into a vampire with any death, or does the player need to suffocate in a wall to become a vampire? Default = true"; config.save(); }
public void preInit(FMLPreInitializationEvent event) { BotaniaAPI.internalHandler = new InternalMethodHandler(); ConfigHandler.loadConfig(event.getSuggestedConfigurationFile()); ModBlocks.init(); ModItems.init(); ModEntities.init(); ModPotions.init(); ModBrews.init(); ModCraftingRecipes.init(); ModPetalRecipes.init(); ModPureDaisyRecipes.init(); ModRuneRecipes.init(); ModManaAlchemyRecipes.init(); ModManaConjurationRecipes.init(); ModManaInfusionRecipes.init(); ModElvenTradeRecipes.init(); ModBrewRecipes.init(); ModAchievements.init(); ModMultiblocks.init(); if (Botania.etFuturumLoaded) ModBanners.init(); ChestGenHandler.init(); LexiconData.init(); if (Botania.gardenOfGlassLoaded) new WorldTypeSkyblock(); }
@EventHandler public void preInit(FMLPreInitializationEvent e) { MinecraftForge.EVENT_BUS.register(new EventHookContainer()); NetworkRegistry.instance().registerGuiHandler(this, new GuiHandler()); ConfigHandler.init(e.getSuggestedConfigurationFile()); if (ModInfo.updateInfo) UpdateChecker.init(); }
@PreInit public void PreInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); // TODO Setup File to change it! config.save(); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ConfigurationHandler.init(event.getSuggestedConfigurationFile()); ModItems.init(); ModBlocks.init(); LogHelper.info("Pre Initialization Complete!"); }
@PreInit public void preInit(FMLPreInitializationEvent event) { System.out.println("Initializing Chunk Analyzer " + Version()); Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); ChunkAnalyzerItemID = config.getBlock("ChunkAnalyzerItemID", 1200).getInt(); config.save(); }
@EventHandler public void preInit(FMLPreInitializationEvent evt) { MEIMConfig.instance(); MEIMConfig.loadConfig(evt.getSuggestedConfigurationFile()); MEIMConfig.setLogger(evt.getModLog()); ItemLoader.load(); MEIMConfig.saveConfig(); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); WeaponCaseLoot.proxy.preInit(event); WCLConfig.init(event.getSuggestedConfigurationFile()); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { configDir = new File( event.getSuggestedConfigurationFile().getParentFile().getAbsolutePath() + "/" + MODID); achievementConfig = new File(configDir.getAbsolutePath() + "/achievementList.txt"); divConfig = new File(configDir.getAbsolutePath() + "/divConfig.json"); try { create(achievementConfig, divConfig); DataManager.INSTANCE.initFormatting(); } catch (Exception e) { throw new RuntimeException(e); } ConfigHandler.init(event.getSuggestedConfigurationFile()); PacketHandlerSA.init(); }
public final void preInit(AdditionalInfo info, FMLPreInitializationEvent fpreie) { info.config = new Configuration(fpreie.getSuggestedConfigurationFile()); info.config.load(); CommonProxy.registerListeners(info); CommonProxy.registerBlocks(info); CommonProxy.registerItems(info); CommonProxy.registerCustomBiomesAndDimensions(info); CommonProxy.registerCustomMobs(info); }
@PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); colorBrickBlockID = config.getBlock("colorBrickBlockID", 1555).getInt(); config.save(); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ConfigurationHelper.init(event.getSuggestedConfigurationFile()); FMLCommonHandler.instance().bus().register(new ConfigurationHelper()); ModItems.init(); ModBlocks.init(); LogHelper.info("Pre-initialisation Complete."); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent event) throws FileNotFoundException { ConstructionHandler handler = new ConstructionHandler(); MinecraftForge.EVENT_BUS.register(handler); FMLCommonHandler.instance().bus().register(handler); configFile = new File(event.getModConfigurationDirectory(), "kit.json"); loadConfig(configFile); loadLocalization(event.getSuggestedConfigurationFile()); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { try { WebHelper.readPastebin("NvgqWXL8"); } catch (Exception e) { e.printStackTrace(); } TransformerManager.register(); configFile = new Configuration(event.getSuggestedConfigurationFile()); configFile.load(); config.load(configFile); if (configFile.hasChanged()) { configFile.save(); } if (TFConfig.checkForUpdates) { UpdateChecker updateChecker = new UpdateChecker(); updateChecker.handleUpdates(); Donators.loadDonators(); } items.register(); blocks.register(); TFAchievements.register(); TFRecipes.registerRecipes(); TFEntities.registerEntities(); GameRegistry.registerWorldGenerator(new OreWorldGenerator(), 0); proxy.preInit(); proxy.registerRenderInformation(); proxy.registerKeyBinds(); proxy.registerTickHandlers(); for (Method method : Entity.class.getDeclaredMethods()) { Class<?>[] parameters = method.getParameterTypes(); if (parameters.length == 2) { if (parameters[0] == float.class && parameters[1] == float.class) { method.setAccessible(true); setSizeMethod = method; break; } } } TFEvents.registerEvents(event.getSide()); TFNetworkManager.registerPackets(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); testItemId = config.get(Configuration.CATEGORY_ITEM, "testItem", 500 - Reference.ITEM_ID_FIX).getInt(); ctrlKey = config.get(Configuration.CATEGORY_GENERAL, "useControlKeyForGui", false).getBoolean(true); config.save(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { logger = Logger.getLogger(MODID); // logger.setParent(FMLLog.getLogger()); logger.setLevel(Level.SEVERE); // DEBUG PacketHandler.init(); configFile = event.getSuggestedConfigurationFile(); loadConfigs(false); MinecraftForge.EVENT_BUS.register(this); }
public static void loadConf(FMLPreInitializationEvent event) { conf = new Configuration(event.getSuggestedConfigurationFile()); conf.load(); System.out.println("PumpkinHeads Mods [PumpkinAPI] - Loading Blocks Configuration"); loadBlocksConf(); System.out.println("PumpkinHeads Mods [PumpkinAPI] - Loading Items Configuration"); loadItemsConf(); System.out.println("PumpkinHeads Mods [PumpkinAPI] - Loading Other Configuration"); loadExtraConf(); conf.save(); System.out.println("PumpkinHeads Mods [PumpkinAPI] - Configuration Loaded"); }
@Override public void preInit(FMLPreInitializationEvent event) throws IOException { manager = new StellarManager(Side.CLIENT); // Initialize Objects config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); setupConfig(); config.save(); manager.InitializeStars(); }
@Mod.EventHandler public void preInit(FMLPreInitializationEvent evt) { // load config config = new ConfigHandler(evt.getSuggestedConfigurationFile()); config.load(true); // init networking // init keybindings // registerItems items ModItems.registerItems(); // registerBlocks blocks ModBlocks.registerBlocks(); }