@PreInit public void preInit(FMLPreInitializationEvent event) { apLogger.setParent(FMLLog.getLogger()); apLogger.info("[Apocalyptic] Starting pre-initialization"); apLogger.info("[Apocalyptic] Loading configuration"); isServer = event.getSide().isServer(); Configuration config = new Configuration(event.getSuggestedConfigurationFile()); tePerChunk = config.get("general", "TileEntitiesPerChunk", 900).getInt(900); silverfishChance = config.get("general", "SilverfishSpawnChance", 0.001).getDouble(0.001); transferLimit = config.get("transfer", "limit", new String[]{"0:0:0", "1:X:1"}).getStringList(); transferTagRemove = config.get("transfer", "tag-remove", new String[]{"0:0", "1:X"}).getStringList(); //databaseURL = config.get("database", "URL", "jdbc:mysql://site.ru:3306/database").getString(); //databaseUsername = config.get("database", "Username", "Username").getString(); //databasePassword = config.get("database", "Password", "Password").getString(); config.load(); config.save(); this.initCustomPotions(event); apLogger.info("[Apocalyptic] Pre-initialization completed"); }
@PreInit public void preInit(FMLPreInitializationEvent event) { logger = Logger.getLogger(ID); logger.setParent(FMLLog.getLogger()); Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); post_url = config.get(config.CATEGORY_GENERAL, "post_url", "http://localhost/post/", "This is the url of which the mod posts updates to.").value; identifier = config.get(config.CATEGORY_GENERAL, "identifier", "knownplayers", "This string determines the value of the id field in the post request.").value; debug = config.get(Configuration.CATEGORY_GENERAL, "debug", false, "Enable debuging?").getBoolean(true); event_login = config.get("event", "login", true, "Send POST on player login?").getBoolean(true); event_logout = config.get("event", "logout", true, "Send POST on player logout?").getBoolean(true); event_respawn = config.get("event", "respawn", true, "Send POST on player respawn?").getBoolean(true); event_changedimension = config.get("event", "changedimension", true, "Send POST when player changes world?").getBoolean(true); config.save(); logger.info("debug: " + debug); logger.info("identifier: " + identifier); logger.info("post_url: " + post_url); logger.info("event_login: " + event_login); logger.info("event_logout: " + event_logout); logger.info("event_respawn: " + event_respawn); logger.info("event_changedimension: " + event_changedimension); }
@PreInit public void preLoad(FMLPreInitializationEvent event) { NetworkRegistry.instance().registerGuiHandler(this, this.proxy); Configuration conf = new Configuration( new File(Loader.instance().getConfigDir(), "OilCraft.cfg")); conf.load(); OilGenerator.makeInstance( conf.get("blocks", "Oil_Generator", 500).getInt(), 0); int stillId = conf.get("blocks", "Oil_Still", 601).getInt(); OilStill.makeInstance(stillId, 7); // Minecraft makes the silly assumption that the block Id of the flow // version of a liquid is 1 less than the still version of that same // liquid. In this way it can build a connection between the two blocks // so they can spawn each other. OilFlow.makeInstance(stillId - 1, 7); conf.save(); proxy.preInit(); }
@PreInit public void preInit(FMLPreInitializationEvent event){ // super Log Helper init for LEDLights LogHelper.init(); // Load config to get our IDs and so ConfigHandler.init(event.getSuggestedConfigurationFile()); // Loading blocks ModBlocks.init(); ModItems.init(); ModCrafting.init(); ClientProxy.setCustomRenderers(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Register the Sound Handler (Client only) MinecraftForge.EVENT_BUS.register(new SoundHandler()); // Initialize the log helper LogHelper.init(); // Initialize the Blocks and Items BlockHelper.init(); ItemHelper.init(); // Initialize the Recipes and Dungeon loot RecipeHelper.init(); LootHelper.init(); // Register the OreGenerator GameRegistry.registerWorldGenerator(new OreWorldGeneratorEnd()); GameRegistry.registerWorldGenerator(new OreWorldGeneratorOverWorld()); GameRegistry.registerWorldGenerator(new OreWorldGeneratorNether()); // Initialize the CapeHelper CapeHelper.init(); // Initialize the Entitys EntityHelper.init(); // Set the name for the creative tab LanguageRegistry.instance().addStringLocalization("itemGroup." + Reference.MOD_ID, "Mythical Gods Mod"); }
@PreInit public void preInit(FMLPreInitializationEvent event) { PaleoPacketHandler.registerChannel(); proxy.registerRenders(); ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); LocalizationHandler.loadLanguages(); ModItem.init(); ModBlock.init(); proxy.PreInitRenders(); WorkTableCogHelper.initRecipes(); MixingTableHelper.initRecipes(); ModLoaded.PreInit_modloaded(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // TODO: Read configuration files for blocks and items Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); //someConfigFlag = Boolean.parseBoolean(config.get(ConfigCategory_Generic, "someConfig", "true").value); config.addCustomCategoryComment(ConfigCategory_Generic, "All generic settings for questcraft"); Property someConfig = config.get(ConfigCategory_Generic, "someConfig", "true"); someConfig.comment = "Configure some configuration setting (true/false). Default true"; someConfigFlag = someConfig.getBoolean(true); Property questInstanceItemIDProperty = config.get(ConfigCategory_Generic, "quest-instance-item-id", "5000"); questInstanceItemIDProperty.comment = "Item ID used for quest instance items"; questInstanceItemID = questInstanceItemIDProperty.getInt(5000); config.save(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Initialize localization LocalizationHandler.loadLanguages(); // Initialize the configuration file ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); // Initialize WorldGen GameRegistry.registerWorldGenerator(new WorldGeneratorEI()); ModBlocks.init(); // Initialize blocks ModItems.init(); // Initialize items ModOres.init(); // Initialize ores ModBiomes.init(); // Initialize Biomes ModWorlds.init(); // Initialize Dimension ModRecipes.init(); //initialize recipes }
/** * This is were you load up blocks/items * * @param event */ @PreInit public void preInit(FMLPreInitializationEvent event) { log(Level.INFO, "PreInitializing " + Reference.MOD_ID + " version: " + meta.version); LocalizationHandler.loadLanguages(); // Initialize the configuration ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); ModBlocks.init(); ModItems.init(); ModContent.init(); GameRegistry.registerWorldGenerator(genManager); NetworkRegistry.instance().registerGuiHandler(this, proxy); }
@PreInit public void preInit(FMLPreInitializationEvent event) { LocalizationHandler.loadLanguages(); ConfigurationHandler.init(new File(event.getModConfigurationDirectory() .getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); // Initialize mod blocks ModBlocks.init(); // Initialize mod items ModItems.init(); GameRegistry.registerWorldGenerator(new OreGenerator()); }
@PreInit public void preInit(FMLPreInitializationEvent ev) { AmitLogger.info("PreInit"); File file = ev.getSuggestedConfigurationFile(); Amitcraft.config = new AmitConfig(file); AmitLogger.info("%s file %s", file.exists() ? "Loaded" : "Created", file.getName()); Amitcraft.config.load(); for (IDelegate d : this.delegates) d.getIds(Amitcraft.config); Amitcraft.config.save(); GameRegistry.registerPlayerTracker(new UpdateNotifier()); NetworkRegistry.instance().registerGuiHandler(Amitcraft.instance, new GuiHandler()); MinecraftForge.EVENT_BUS.register(new SoundHandler()); }
@PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); boolean checkForDatabaseUpdates = config.get("general", "Check for database updates", true).getBoolean(true); modDirectory = new File(event.getModConfigurationDirectory().getParent()); if (!DBHelper.has(checkForDatabaseUpdates)) { throw new RuntimeException("Can not start Pixelmon without SQLite jar or database!!! Please reinstall!!"); } if (Loader.isModLoaded("Pokemobs")) System.exit(1); event.getModMetadata().version = "2.2"; MaemeConfig.loadConfig(config); }
@PreInit public void preInit(FMLPreInitializationEvent event) { //load the last good configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); readConfig(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { logger = Logger.getLogger(ID); logger.setParent(FMLLog.getLogger()); Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); // post_url = config.get(config.CATEGORY_GENERAL, "post_url", // "http://localhost/post/", // "This is the url of which the mod posts updates to.").value; identifier = config.get(config.CATEGORY_GENERAL, "identifier", "commandforwarder", "This string determines the value of the id field in the post request.").value; debug = config.get(Configuration.CATEGORY_GENERAL, "debug", false, "Enable debuging?").getBoolean(true); ConfigCategory cmdcat = config.getCategory("commands"); cmdcat.setComment("This is a list of command=url."); Map<String, Property> cmdmap = cmdcat.getValues(); if (cmdmap.isEmpty()) { config.get("commands", "example", "http://localhost/post/"); } for (Map.Entry i : cmdmap.entrySet()) { String k = (String) i.getKey(); Property v = (Property) i.getValue(); Command cmd = new Command(k, v.value); this.commands.add(cmd); } // public Map<String,Property> getValues() config.save(); logger.info("debug: " + debug); logger.info("identifier: " + identifier); // logger.info("post_url: " + post_url); }
@PreInit public void preInit(FMLPreInitializationEvent event) { LogHelper.init(); LocalizationHandler.loadLanguages(); ConfigurationHandler.init(new File(event.getModConfigurationDirectory() .getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); ModBlocks.init(); ModItems.init(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { LOG = event.getModLog(); if (FMLCommonHandler.instance().getSide().isServer() && ObfuscationReflectionHelper.obfuscation) throw new RuntimeException("Stereoscopic3D should not be installed on a server!"); initConfig(event); initRenderer(); }
@PreInit public void preInit(FMLPreInitializationEvent evt) { SPSConfig.setConfigFolderBase(evt.getModConfigurationDirectory()); SPSConfig.loadCommonConfig(evt); SPSConfig.extractLang(new String[] { "en_US" }); SPSConfig.loadLang(); logger = evt.getModLog(); }
@PreInit // used in 1.5.2 public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); deepStorageTankBlockID = config.getBlock("DeepStorageTank", deepStorageTankBlockID).getInt(); config.save(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Initialize the log helper // LogHelper.init(); // Load the localization files into the LanguageRegistry LocalizationHandler.loadLanguages(); // Initialize the configuration ConfigurationHandler.init(new File(event.getModConfigurationDirectory() .getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); // Conduct the version check and log the result // VersionHelper.execute(); // Initialize the Version Check Tick Handler (Client only) // TickRegistry.registerTickHandler(new VersionCheckTickHandler(), // Side.CLIENT); // Initialize the Render Tick Handler (Client only) // proxy.registerRenderTickHandler(); // Register the KeyBinding Handler (Client only) // proxy.registerKeyBindingHandler(); // Register the Sound Handler (Client only) // proxy.registerSoundHandler(); // Initialize mod blocks // ModBlocks.init(); // Initialize mod items ModItems.init(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { AddonConfig.setConfigFolderBase(event.getModConfigurationDirectory()); AddonConfig.initItems(); proxy.registerRenderers(); //proxy.readManuals(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Initialize the log helper LogHelper.init(); LocalizationHandler.loadLanguagesIntoRegistry(); Config.init(event.getSuggestedConfigurationFile()); proxy.registerSoundHandler(); proxy.registerTickHandlers(); XRItems.init(); XRAlkahestry.init(); AlkahestMap.init(); XRItems.registerLiquidContainer(); XRBlocks.init(); }
@PreInit public void preInit(FMLPreInitializationEvent evt) { HexxitGearConfig.setConfigFolderBase(evt.getModConfigurationDirectory()); HexxitGearConfig.loadCommonConfig(evt); HexxitGearConfig.extractLang(new String[]{"en_US"}); HexxitGearConfig.loadLang(); HexxitGearConfig.registerDimBlacklist(); logger = evt.getModLog(); playerEventHandler = new PlayerEventHandler(); MinecraftForge.EVENT_BUS.register(playerEventHandler); }
@PreInit public void preinit(FMLPreInitializationEvent event) { ConfigurationHandler.preConfig(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.CHANNEL_NAME + File.separator + Reference.MOD_ID + ".cfg")); AddedBlocks.preinit(); AddedItems.preInit(); AddedBlocks.blockRecipes(); AddedItems.itemRecipes(); AddedBiomes.initBiomes(); AddedDimensions.InitDim(); LocalizationHandler.loadlanguages(); GameRegistry.registerCraftingHandler(new ColouringCraftingHandler()); }
@PreInit public void preInit(FMLPreInitializationEvent e) { powerSystemRedPower = new PowerSystem("RedPower", "RP2", 7000, 7000, null, null, "W"); PowerSystem.registerPowerSystem(powerSystemRedPower); Configuration config = new Configuration(e.getSuggestedConfigurationFile()); loadConfig(config); }
@PreInit public void preInit(FMLPreInitializationEvent event) { //Classes RecipeRemover.remover(); ConfigurationHander.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + References.CHANNEL_NAME + File.separator + References.MOD_ID + ".cfg")); Blocks.blocksInit(); Items.itemsInit(); Crafting.craft(); }
@PreInit public void preInit(FMLPreInitializationEvent event) { Configuration cfg = new Configuration(event.getSuggestedConfigurationFile()); FMLLog.log(Level.FINE, "PlaceholderBlocks loading config"); try { cfg.load(); ConfigCategory category = cfg.getCategory("Blocks"); for (Map.Entry<String, Property> entry : category.entrySet()) { String key = entry.getKey(); Property property = entry.getValue(); if (property.getString().length() == 0) { // not set continue; } // parse configuration entry AbstractBlock abstractBlock = new AbstractBlock(key, property.getString()); // add to list keyed by block ID List<AbstractBlock> list; if (abstractBlocks.containsKey(abstractBlock.id)) { list = abstractBlocks.get(abstractBlock.id); } else { list = new ArrayList<AbstractBlock>(); } list.add(abstractBlock); abstractBlocks.put(abstractBlock.id, list); } } catch (Exception e) { FMLLog.log(Level.SEVERE, e, "PlaceholderBlocks had a problem loading it's configuration"); } finally { cfg.save(); } }
@PreInit public void preInit(FMLPreInitializationEvent event) { ModHearthstone.config = new Configuration(event.getSuggestedConfigurationFile()); ModHearthstone.config.load(); proxy.registerSoundHandler(); this.initPotionTypes(); }
/** * {@inheritDoc} */ @PreInit public void preInit(FMLPreInitializationEvent event) { config = Config.load(event); side = event.getSide(); P2P.register(new Server()); if (side == Side.CLIENT) { P2P.register(new Client()); } }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Initialize the Blocks and Items BlockHelper.init(); ItemHelper.init(); // Initialize the Recipes and Dungeon loot RecipeHelper.init(); // Register Ore spawns GameRegistry.registerWorldGenerator(new DecorativeGemsWorldGen()); }
@PreInit public void preInit( FMLPreInitializationEvent event ) { }
@PreInit // used in 1.5.2 public void preInit(FMLPreInitializationEvent event) { // Stub Method }
@PreInit public void preInit(FMLPreInitializationEvent event) { core.preInit(event.getSourceFile(), this); }
@PreInit public void preInit(FMLPreInitializationEvent e){ config = new ConfigHandler(e.getSuggestedConfigurationFile()); TickRegistry.registerTickHandler(new TickHandler(), Side.CLIENT); }
@PreInit public void preInit(FMLPreInitializationEvent event) { Utils.loadConfig(event); }
@PreInit public void preInit(FMLPreInitializationEvent event) { // Stub Method }
@PreInit public void preInit(FMLPreInitializationEvent event) { config = new ConfigHandler(event.getSuggestedConfigurationFile()); TickRegistry.registerTickHandler(new TickHandler(), Side.CLIENT); }
@PreInit public void preInit(FMLPreInitializationEvent event) { }
@PreInit public void preInit(FMLPreInitializationEvent evt) { Config.init(evt); GameRegistry.registerPlayerTracker(new PlayerTracker()); }
@PreInit public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); config = new Configuration(event.getSuggestedConfigurationFile()); }
@PreInit public static void preInit(FMLPreInitializationEvent event) { oreName2PreferredMod = new HashMap<String, String>(); Configuration cfg = new Configuration(event.getSuggestedConfigurationFile()); FMLLog.log(Level.FINE, "OreDupeFix loading config"); try { cfg.load(); if (cfg.getCategoryNames().size() == 0) { loadDefaults(cfg); } ConfigCategory category = cfg.getCategory("PreferredOres"); for (Map.Entry<String, Property> entry : category.entrySet()) { String name = entry.getKey(); Property property = entry.getValue(); if (property.getString().length() == 0) { // not set continue; } oreName2PreferredMod.put(name, property.getString()); } shouldDumpOreDict = cfg.get(Configuration.CATEGORY_GENERAL, "dumpOreDict", true).getBoolean(true); verbose = cfg.get(Configuration.CATEGORY_GENERAL, "verbose", true).getBoolean(true); // TODO: refactor replaceCrafting = cfg.get(Configuration.CATEGORY_GENERAL, "replaceCrafting", true).getBoolean(true); replaceFurnace = cfg.get(Configuration.CATEGORY_GENERAL, "replaceFurnace", true).getBoolean(true); replaceFurnaceInsensitive = cfg.get(Configuration.CATEGORY_GENERAL, "replaceFurnaceInsensitive", true).getBoolean(true); replaceDungeonLoot = cfg.get(Configuration.CATEGORY_GENERAL, "replaceDungeonLoot", true).getBoolean(true); replaceIC2Compressor = cfg.get(Configuration.CATEGORY_GENERAL, "replaceIC2Compressor", true).getBoolean(true); replaceIC2Extractor = cfg.get(Configuration.CATEGORY_GENERAL, "replaceIC2Extractor", true).getBoolean(true); replaceIC2Macerator = cfg.get(Configuration.CATEGORY_GENERAL, "replaceIC2Macerator", true).getBoolean(true); replaceIC2Scrapbox = cfg.get(Configuration.CATEGORY_GENERAL, "replaceIC2Scrapbox", true).getBoolean(true); } catch (Exception e) { FMLLog.log(Level.SEVERE, e, "OreDupeFix had a problem loading it's configuration"); } finally { cfg.save(); } }