Package net.minecraftforge.common.config

Examples of net.minecraftforge.common.config.Configuration.load()


        Version.init(event.getVersionProperties());
        event.getModMetadata().version = Version.fullVersionString();
        Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
        try
        {
            cfg.load();
            ChestChangerType.buildItems(cfg);
            CACHE_RENDER = cfg.get(Configuration.CATEGORY_GENERAL, "cacheRenderingInformation", true).getBoolean(true);
            OCELOTS_SITONCHESTS = cfg.get(Configuration.CATEGORY_GENERAL, "ocelotsSitOnChests", true).getBoolean(true);
        }
        catch (Exception e)
View Full Code Here


    {

        /* [Forge] Configuration class, used as config method */
        Configuration config = new Configuration(confFile);
        /* Load the configuration file */
        config.load();

        Natura.retrogen = config.get("Retrogen", "Retroactive Generation", false).getBoolean(false);

        boolean BoP = false;
        if(Loader.isModLoaded("BiomesOPlenty"))
View Full Code Here

    {
        jarfile = event.getSourceFile();
        // Load configuration file - use suggested (config/WesterosBlocks.cfg)
        Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
        try {
            cfg.load();
           
            useforcedchunks = cfg.get("Settings""UseForcedChunks", true).getBoolean(true);
        }
        finally
        {
View Full Code Here

    public void loadConfig(File file) {

        Configuration config = new Configuration(file);

        config.load();

        DenseOresRegistry.initVanillaOres();

        // 'get' the vanilla ore entries to ensure that they exist
        for (DenseOre ore : DenseOresRegistry.ores.values()) {
View Full Code Here

        {
            return null;
        }

        Configuration cfg = new Configuration(file, true);
        cfg.load();
        ITypeInfo<?> info = DataStorageManager.getInfoForType(type);
        TypeData data = DataStorageManager.getDataForType(type);
        readClassFromProperty(cfg, cfg.getCategory(type.getFileSafeName()), data, info);
        data.setUniqueKey(uniqueKey);
View Full Code Here

    Locale locale = Locale.getDefault();
    Locale.setDefault(Locale.ENGLISH);

    Configuration config = new Configuration(new File(Forestry.instance.getConfigFolder(), MODULE_CONFIG_FILE_NAME));

    config.load();
    config.addCustomCategoryComment(CATEGORY_MODULES, "Disabling these modules can greatly change how the mod functions.\n"
        + "Your mileage may vary, please report any issues.");

    Set<Module> toLoad = EnumSet.allOf(Module.class);
    Iterator<Module> it = toLoad.iterator();
View Full Code Here

        Locale locale = Locale.getDefault();
        Locale.setDefault(Locale.ENGLISH);

        Configuration config = new Configuration(new File(Railcraft.getMod().getConfigFolder(), MODULE_CONFIG_FILE_NAME));

        config.load();
        config.addCustomCategoryComment(CATEGORY_MODULES, "Disabling these modules can greatly change how the mod functions.\n"
                + "For example, disabling the Train Module will prevent you from linking carts.\n"
                + "Disabling the World Module will disable all world gen.\n"
                + "Disabling the Energy Module will remove the energy requirement from machines, "
                + "but will only do so if Forestry or Buildcraft are not installed.");
View Full Code Here

        File newFile = new File(location + File.separator + "TwilightForest.cfg");
        if (newFile.exists())
        {
            Configuration config = new Configuration(newFile);

            config.load();

            twilightForestDimensionID = config.get("dimension", "dimensionID", -100).getInt();
            TConstruct.logger.trace("Twilight Forest Dim ID: " + twilightForestDimensionID);
        }
        else
View Full Code Here

        File newFile = new File(location + File.separator + "biomesoplenty" + File.separator + "ids.cfg");
        if (newFile.exists())
        {
            Configuration config = new Configuration(newFile);

            config.load();

            promisedLandDimensionID = config.get("dimension settings", "Promised Land Dimension ID", -200).getInt();
            TConstruct.logger.trace("Promised Lands Dim ID: " + promisedLandDimensionID);
        }
        else
View Full Code Here

    }

    @Override
    public void saveToConfig(){
        Configuration config = Config.config;
        config.load();
        config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Block_Tracker", "stat X", -1).set(blockTrackInfo.getBaseX());
        config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Block_Tracker", "stat Y", 46).set(blockTrackInfo.getBaseY());
        config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Block_Tracker", "stat leftsided", true).set(blockTrackInfo.isLeftSided());
        statX = blockTrackInfo.getBaseX();
        statY = blockTrackInfo.getBaseY();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.