Package net.minecraftforge.common.config

Examples of net.minecraftforge.common.config.Property


    return !modsForbidden.contains(modid) && !blocksForbidden.contains(name);
  }

  public static void readConfiguration (Configuration conf) {
    Property excludedMods = conf.get(Configuration.CATEGORY_GENERAL, "builder.excludedMods", new String [0],
        "mods that should be excluded from the builder.");
    Property excludedBlocks = conf.get(Configuration.CATEGORY_GENERAL, "builder.excludedBlocks", new String [0],
        "blocks that should be excluded from the builder.");

    for (String id : excludedMods.getStringList()) {
      String strippedId = JavaTools.stripSurroundingQuotes(id.trim());

      if (strippedId.length() > 0) {
        modsForbidden.add(strippedId);
      }
    }

    for (String id : excludedBlocks.getStringList()) {
      String strippedId = JavaTools.stripSurroundingQuotes(id.trim());

      if (strippedId.length() > 0) {
        blocksForbidden.add(strippedId);
      }
View Full Code Here


        config.addCustomCategoryComment(CATEGORY_KAMI_BLOCKS, comment);
        config.addCustomCategoryComment(CATEGORY_KAMI_GENERAL, comment);

        config.load();

        Property propEnableKami = config.get(Configuration.CATEGORY_GENERAL, "kami.forceenabled", true);
        propEnableKami.comment = "Set to true to enable all kami stuff (note, either this OR the kami mod file will work)";
        enableKami = Loader.isModLoaded("ThaumicTinkererKami") || propEnableKami.getBoolean(true);

        Property propEnableTooltips = config.get(Configuration.CATEGORY_GENERAL, "tooltipIndicators.enabled", true);
        propEnableTooltips.comment = "Set to false to disable the [TT] tooltips in the thauminomicon.";
        useTootlipIndicators = propEnableTooltips.getBoolean(true);

        Property propEnableSurvivalShareTome = config.get(Configuration.CATEGORY_GENERAL, "shareTome.survival.enabled", true);
        propEnableSurvivalShareTome.comment = "Set to false to disable the crafting recipe for the Tome of Research Sharing.";
        enableSurvivalShareTome = propEnableSurvivalShareTome.getBoolean(true);

        Property propEasymodeResearch = config.get(Configuration.CATEGORY_GENERAL, "research.easymode.enabled", false);
        propEasymodeResearch.comment = "Set to true to enable Easy Research (getting research notes = instant discovery). For those who don't like research. (DEPRECATED: Please use thaumcraft.cfg to edit this now, all this does is alter that)";
        enableEasymodeResearch = propEasymodeResearch.getBoolean(false);
        Config.researchDifficulty = (enableEasymodeResearch) ? -1 : Config.researchDifficulty;

        Property propDebugCommands = config.get(Configuration.CATEGORY_GENERAL, "debugCommands.enabled", false);
        propDebugCommands.comment = "Set to true to enable debugging commands.";
        enableDebugCommands = propDebugCommands.getBoolean(false);

        Property propEnableFlight = config.get(Configuration.CATEGORY_GENERAL, "modFlight.enabled", true);
        propEnableFlight.comment = "Set to true to enable flight in this mod.";
        enableFlight = propEnableFlight.getBoolean(true);

        Property propRepairTCon = config.get(Configuration.CATEGORY_GENERAL, "repairTconTools.enabled", false);
        propRepairTCon.comment = "Can Thaumic Tinkerer repair Tinkers Construct tools.";
        repairTConTools = propRepairTCon.getBoolean(false);

        Property propOreDict = config.get(Configuration.CATEGORY_GENERAL, "oreDictMetal.enabled", true);
        propOreDict.comment = "Set to false to disable usage of ore dictionary metals (tin and copper).";
        useOreDictMetal = propOreDict.getBoolean(true);

        Property propImbuedFire = config.get(Configuration.CATEGORY_GENERAL, "imbuedFire.enabled", true);
        enableFire = propImbuedFire.getBoolean(true);

        Property propImbuedFireCake = config.get(Configuration.CATEGORY_GENERAL, "imbuedFire.cake.enabled", true);
        propImbuedFireCake.comment = "Set to false to disable imbued fire making cake. For those people who don't like cake";
        enableCake = propImbuedFireCake.getBoolean(true);

        Property propCropsAllowBonemeal = config.get(Configuration.CATEGORY_GENERAL, "cropsAllowBonemeal.enabled", false);
        propCropsAllowBonemeal.comment = "Allows crops to be grown using bonemeal. Useful for debug purposes.";
        cropsAllowBonemeal = propCropsAllowBonemeal.getBoolean(false);


        if (enableKami) {
            Property propDimensionID = config.get(CATEGORY_KAMI_GENERAL, "Bedrock dimension id", -19);
            propDimensionID.comment = "Set to the dimension id wished for bedrock dimension, or 0 to disable";
            bedrockDimensionID = propDimensionID.getInt(-19);

            Property oreBlacklist = config.get(CATEGORY_KAMI_GENERAL, "Bedrock dimension ore Blacklist", new String[]{"oreFirestone"});
            oreBlacklist.comment = "These ores will not be spawned in the bedrock dimension";
            OreClusterGenerator.blacklist = oreBlacklist.getStringList();

            Property propOreDensity = config.get(Configuration.CATEGORY_GENERAL, "Bedrock Dimension ore density", 1);
            propOreDensity.comment = "The number of verticle veins of ore per chunk. Default: 1";
            OreClusterGenerator.density = propOreDensity.getInt(1);

            Property propShowPlacementMirrorBlocks = config.get(CATEGORY_KAMI_GENERAL, "placementMirror.blocks.show", true);
            propShowPlacementMirrorBlocks.comment = "Set to false to remove the phantom blocks displayed by the Worldshaper's Seeing Glass.";
            showPlacementMirrorBlocks = propShowPlacementMirrorBlocks.getBoolean(true);

            Property propNetherID = config.get(CATEGORY_KAMI_GENERAL, "dimension.nether.id", -1);
            propNetherID.comment = "The Dimension ID for the Nether, leave at -1 if you don't modify it with another mod/plugin.";
            netherDimensionID = propNetherID.getInt(-1);

            Property propEndID = config.get(CATEGORY_KAMI_GENERAL, "dimension.end.id", 1);
            propEndID.comment = "The Dimension ID for the End, leave at 1 if you don't modify it with another mod/plugin.";
            endDimensionID = propEndID.getInt(1);
        }

        LibEnchantIDs.idAscentBoost = loadEnchant(LibEnchantNames.ASCENT_BOOST, LibEnchantIDs.idAscentBoost);
        LibEnchantIDs.idSlowFall = loadEnchant(LibEnchantNames.SLOW_FALL, LibEnchantIDs.idSlowFall);
        LibEnchantIDs.idAutoSmelt = loadEnchant(LibEnchantNames.AUTO_SMELT, LibEnchantIDs.idAutoSmelt);
View Full Code Here

      metadata = defaultPattern.getItemStack().getItemDamage();
      rate = defaultPattern.rate;
      lexiconSize = defaultPattern.lexiconSize;
    }

    Property prop=config.get("Shedding", key + ".item", itemName);
    prop.comment = "Configuration of Shedding for "+key;
    itemName = prop.getString();
    rate = config.get("Shedding", key + ".rate", rate).getInt();
    metadata = config.get("Shedding", key + ".metadata", metadata).getInt();
    lexiconSize = config.get("Shedding", key + ".lexiconDisplaySize", lexiconSize).getInt();

    if(itemName != "" && rate != -1)
View Full Code Here

    if(config.hasChanged())
      config.save();
  }

  public static int loadPropInt(String propName, String desc, int default_) {
    Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
    prop.comment = desc;
    return prop.getInt(default_);
  }
View Full Code Here

    prop.comment = desc;
    return prop.getInt(default_);
  }

  public static double loadPropDouble(String propName, String desc, double default_) {
    Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
    prop.comment = desc;
    return prop.getDouble(default_);
  }
View Full Code Here

    prop.comment = desc;
    return prop.getDouble(default_);
  }

  public static boolean loadPropBool(String propName, String desc, boolean default_) {
    Property prop = config.get(Configuration.CATEGORY_GENERAL, propName, default_);
    prop.comment = desc;
    return prop.getBoolean(default_);
  }
View Full Code Here

    {
        List<String> propOrder = new ArrayList<String>();

        try
        {
            Property prop;

            if (!config.isChild)
            {
                if (load)
                {
                    config.load();
                }
            }

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "idDimensionMoon", -28);
            prop.comment = "Dimension ID for the Moon";
            prop.setLanguageKey("gc.configgui.idDimensionMoon").setRequiresMcRestart(true);
            idDimensionMoon = prop.getInt();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "idDimensionOverworldOrbit", -27);
            prop.comment = "Dimension ID for Overworld Space Stations";
            prop.setLanguageKey("gc.configgui.idDimensionOverworldOrbit").setRequiresMcRestart(true);
            idDimensionOverworldOrbit = prop.getInt();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "idDimensionOverworldOrbitStatic", -26);
            prop.comment = "Dimension ID for Static Overworld Space Stations";
            prop.setLanguageKey("gc.configgui.idDimensionOverworldOrbitStatic").setRequiresMcRestart(true);
            idDimensionOverworldOrbitStatic = prop.getInt();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "Static Loaded Dimensions", ConfigManagerCore.staticLoadDimensions);
            prop.comment = "IDs to load at startup, and keep loaded until server stops. Can be added via /gckeeploaded";
            prop.setLanguageKey("gc.configgui.staticLoadedDimensions");
            staticLoadDimensions = prop.getIntList();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "Dimensions where rockets cannot launch", ConfigManagerCore.disableRocketLaunchDimensions);
            prop.comment = "IDs of dimensions where rockets should not launch - this should always include the Nether.";
            prop.setLanguageKey("gc.configgui.rocketDisabledDimensions");
            disableRocketLaunchDimensions = prop.getIntList();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "Disable rockets from returning to Overworld", false);
            prop.comment = "If true, rockets will be unable to reach the Overworld (only use this in special modpacks!)";
            prop.setLanguageKey("gc.configgui.rocketDisableOverworldReturn");
            disableRocketsToOverworld = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Force Overworld Spawn", false);
            prop.comment = "By default, you will respawn on galacticraft dimensions if you die. If you set this to true, you will respawn back on earth.";
            prop.setLanguageKey("gc.configgui.forceOverworldRespawn");
            forceOverworldRespawn = prop.getBoolean(false);
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_SCHEMATIC, "idSchematicRocketT1", 0);
            prop.comment = "Schematic ID for Tier 1 Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idSchematicRocketT1");
            idSchematicRocketT1 = prop.getInt(0);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_SCHEMATIC, "idSchematicMoonBuggy", 1);
            prop.comment = "Schematic ID for Moon Buggy, must be unique.";
            prop.setLanguageKey("gc.configgui.idSchematicMoonBuggy");
            idSchematicMoonBuggy = prop.getInt(1);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_SCHEMATIC, "idSchematicAddSchematic", Integer.MAX_VALUE);
            prop.comment = "Schematic ID for \"Add Schematic\" Page, must be unique";
            prop.setLanguageKey("gc.configgui.idSchematicAddSchematic");
            idSchematicAddSchematic = prop.getInt(Integer.MAX_VALUE);
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_ACHIEVEMENTS, "idAchievBase", 1784);
            prop.comment = "Base Achievement ID. All achievement IDs will start at this number.";
            prop.setLanguageKey("gc.configgui.idAchievBase");
            idAchievBase = prop.getInt(1784);
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityEvolvedSpider", 155);
            prop.comment = "Entity ID for Evolved Spider, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityEvolvedSpider").setRequiresMcRestart(true);
            idEntityEvolvedSpider = prop.getInt(155);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityEvolvedCreeper", 156);
            prop.comment = "Entity ID for Evolved Creeper, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityEvolvedCreeper").setRequiresMcRestart(true);
            idEntityEvolvedCreeper = prop.getInt(156);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityEvolvedZombie", 157);
            prop.comment = "Entity ID for Evolved Zombie, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityEvolvedZombie").setRequiresMcRestart(true);
            idEntityEvolvedZombie = prop.getInt(157);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityEvolvedSkeleton", 158);
            prop.comment = "Entity ID for Evolved Skeleton, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityEvolvedSkeleton").setRequiresMcRestart(true);
            idEntityEvolvedSkeleton = prop.getInt(158);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntitySpaceship", 159);
            prop.comment = "Entity ID for Tier 1 Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntitySpaceship").setRequiresMcRestart(true);
            idEntitySpaceship = prop.getInt(159);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityMeteor", 161);
            prop.comment = "Entity ID for Meteor, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityMeteor").setRequiresMcRestart(true);
            idEntityMeteor = prop.getInt(161);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityBuggy", 162);
            prop.comment = "Entity ID for Buggy, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityBuggy").setRequiresMcRestart(true);
            idEntityBuggy = prop.getInt(162);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityFlag", 163);
            prop.comment = "Entity ID for Flag Entity, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityFlag").setRequiresMcRestart(true);
            idEntityFlag = prop.getInt(163);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityParaChest", 165);
            prop.comment = "Entity ID for Parachest, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityParaChest").setRequiresMcRestart(true);
            idEntityParaChest = prop.getInt(165);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityAlienVillager", 166);
            prop.comment = "Entity ID for Alien Villager, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityAlienVillager").setRequiresMcRestart(true);
            idEntityAlienVillager = prop.getInt(166);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityOxygenBubble", 167);
            prop.comment = "Entity ID for Oxygen Bubble, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityOxygenBubble").setRequiresMcRestart(true);
            idEntityOxygenBubble = prop.getInt(167);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityLander", 168);
            prop.comment = "Entity ID for Moon Lander, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityLander").setRequiresMcRestart(true);
            idEntityLander = prop.getInt(168);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityEvolvedSkeletonBoss", 170);
            prop.comment = "Entity ID for Skeleton Boss, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityEvolvedSkeletonBoss").setRequiresMcRestart(true);
            idEntityEvolvedSkeletonBoss = prop.getInt(170);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityCelestialScreen", 184);
            prop.comment = "Entity ID for (hidden) Celestial Selection Entity, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityCelestialScreen").setRequiresMcRestart(true);
            idEntityCelestial = prop.getInt(184);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityMeteorChunk", 179);
            prop.comment = "Entity ID for Throwable Meteor Chunk, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityMeteorChunk").setRequiresMcRestart(true);
            idEntityMeteorChunk = prop.getInt(179);
            propOrder.add(prop.getName());

//Client side

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "More Stars", true);
            prop.comment = "Setting this to false will revert night skies back to default minecraft star count";
            prop.setLanguageKey("gc.configgui.moreStars");
            moreStars = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Spaceship Particles", false);
            prop.comment = "If you have FPS problems, setting this to true will help if rocket particles are in your sights";
            prop.setLanguageKey("gc.configgui.disableSpaceshipParticles");
            disableSpaceshipParticles = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Minimap Left", false);
            prop.comment = "If true, this will move the Oxygen Indicator to the left side. You can combine this with \"Minimap Bottom\"";
            prop.setLanguageKey("gc.configgui.oxygenIndicatorLeft");
            oxygenIndicatorLeft = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Minimap Bottom", false);
            prop.comment = "If true, this will move the Oxygen Indicator to the bottom. You can combine this with \"Minimap Left\"";
            prop.setLanguageKey("gc.configgui.oxygenIndicatorBottom");
            oxygenIndicatorBottom = prop.getBoolean(false);
            propOrder.add(prop.getName());

//World gen

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Oil Generation Factor", 1.8);
            prop.comment = "Increasing this will increase amount of oil that will generate in each chunk.";
            prop.setLanguageKey("gc.configgui.oilGenFactor");
            oilGenFactor = prop.getDouble(1.8);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Oil gen in external dimensions", new int[] { 0 });
            prop.comment = "List of non-galacticraft dimension IDs to generate oil in.";
            prop.setLanguageKey("gc.configgui.externalOilGen");
            externalOilGen = prop.getIntList();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Enable Copper Ore Gen", true);
            prop.comment = "If this is enabled, copper ore will generate on the overworld.";
            prop.setLanguageKey("gc.configgui.enableCopperOreGen").setRequiresMcRestart(true);
            enableCopperOreGen = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Enable Tin Ore Gen", true);
            prop.comment = "If this is enabled, tin ore will generate on the overworld.";
            prop.setLanguageKey("gc.configgui.enableTinOreGen").setRequiresMcRestart(true);
            enableTinOreGen = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Enable Aluminum Ore Gen", true);
            prop.comment = "If this is enabled, aluminum ore will generate on the overworld.";
            prop.setLanguageKey("gc.configgui.enableAluminumOreGen").setRequiresMcRestart(true);
            enableAluminumOreGen = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Enable Silicon Ore Gen", true);
            prop.comment = "If this is enabled, silicon ore will generate on the overworld.";
            prop.setLanguageKey("gc.configgui.enableSiliconOreGen").setRequiresMcRestart(true);
            enableSiliconOreGen = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Cheese Ore Gen on Moon", false);
            prop.comment = "Disable Cheese Ore Gen on Moon.";
            prop.setLanguageKey("gc.configgui.disableCheeseMoon");
            disableCheeseMoon = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Tin Ore Gen on Moon", false);
            prop.comment = "Disable Tin Ore Gen on Moon.";
            prop.setLanguageKey("gc.configgui.disableTinMoon");
            disableTinMoon = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Copper Ore Gen on Moon", false);
            prop.comment = "Disable Tin Ore Gen on Moon.";
            prop.setLanguageKey("gc.configgui.disableCopperMoon");
            disableCopperMoon = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Moon Village Gen", false);
            prop.comment = "If true, moon villages will not generate.";
            prop.setLanguageKey("gc.configgui.disableMoonVillageGen");
            disableMoonVillageGen = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Generate other mods features on planets", false);
            prop.comment = "If this is enabled, other mods' ores and all other features (eg. plants) can generate on the Moon and planets.";
            prop.setLanguageKey("gc.configgui.enableOtherModsFeatures");
            enableOtherModsFeatures = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Other mods ores for GC to generate on the Moon and planets", new String [] { });
            prop.comment = "Enter IDs of other mods' ores here for Galacticraft to generate them on the Moon and other planets. Format is BlockName or BlockName:metadata. Use optional parameters at end of each line: /RARE /UNCOMMON or /COMMON for rarity in a chunk; /DEEP /SHALLOW or /BOTH for height; /SINGLE /STANDARD or /LARGE for clump size; /XTRARANDOM for ores sometimes there sometimes not at all.  /ONLYMOON or /ONLYMARS if wanted on one planet only.  If nothing specified, defaults are /COMMON, /BOTH and /STANDARD.  Repeat lines to generate a huge quantity of ores.";
            prop.setLanguageKey("gc.configgui.otherModOreGenIDs");
            oregenIDs = prop.getStringList();
            propOrder.add(prop.getName());

//Debug

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Enable Debug Messages", false);
            prop.comment = "If this is enabled, debug messages will appear in the console. This is useful for finding bugs in the mod.";
            prop.setLanguageKey("gc.configgui.enableDebug");
            enableDebug = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable lander on Moon and other planets", false);
            prop.comment = "If this is true, the player will parachute onto the Moon instead - use only in debug situations.";
            prop.setLanguageKey("gc.configgui.disableLander");
            disableLander = prop.getBoolean(false);
            propOrder.add(prop.getName());

//Server side

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Spaceship Explosion", false);
            prop.comment = "Spaceships will not explode on contact if set to true.";
            prop.setLanguageKey("gc.configgui.disableSpaceshipGrief");
            disableSpaceshipGrief = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Space Stations Require Permission", true);
            prop.comment = "While true, space stations require you to invite other players using /ssinvite <playername>";
            prop.setLanguageKey("gc.configgui.spaceStationsRequirePermission");
            spaceStationsRequirePermission = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Disable Space Station creation", false);
            prop.comment = "If set to true on a server, players will be completely unable to create space stations.";
            prop.setLanguageKey("gc.configgui.disableSpaceStationCreation");
            disableSpaceStationCreation = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Override Capes", true);
            prop.comment = "By default, Galacticraft will override capes with the mod's donor cape. Set to false to disable.";
            prop.setLanguageKey("gc.configgui.overrideCapes");
            overrideCapes = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Space Station Solar Energy Multiplier", 2.0);
            prop.comment = "Solar panels will work (default 2x) more effective on space stations.";
            prop.setLanguageKey("gc.configgui.spaceStationEnergyScalar");
            spaceStationEnergyScalar = prop.getDouble(2.0);
            propOrder.add(prop.getName());

            try
            {
                prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "External Sealable IDs", new String[] { GameData.getBlockRegistry().getNameForObject(Blocks.glass_pane) + ":0" });
                prop.comment = "List non-opaque blocks from other mods (for example, special types of glass) that the Oxygen Sealer should recognize as solid seals. Format is BlockName or BlockName:metadata";
                prop.setLanguageKey("gc.configgui.sealableIDs").setRequiresMcRestart(true);
                sealableIDs = prop.getStringList();
                propOrder.add(prop.getName());
            }
            catch (Exception e)
            {
                FMLLog.severe("[Galacticraft] It appears you have installed the 'Dev' version of Galacticraft instead of the regular version (or vice versa).  Please re-install.");
            }

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "External Detectable IDs", new String[] { GameData.getBlockRegistry().getNameForObject(Blocks.coal_ore), GameData.getBlockRegistry().getNameForObject(Blocks.diamond_ore), GameData.getBlockRegistry().getNameForObject(Blocks.gold_ore), GameData.getBlockRegistry().getNameForObject(Blocks.iron_ore), GameData.getBlockRegistry().getNameForObject(Blocks.lapis_ore), GameData.getBlockRegistry().getNameForObject(Blocks.redstone_ore), GameData.getBlockRegistry().getNameForObject(Blocks.lit_redstone_ore) });
            prop.comment = "List blocks from other mods that the Sensor Glasses should recognize as solid blocks. Format is BlockName or BlockName:metadata.";
            prop.setLanguageKey("gc.configgui.detectableIDs").setRequiresMcRestart(true);
            detectableIDs = prop.getStringList();
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Suffocation Cooldown", 100);
            prop.comment = "Lower/Raise this value to change time between suffocation damage ticks";
            prop.setLanguageKey("gc.configgui.suffocationCooldown");
            suffocationCooldown = prop.getInt(100);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Suffocation Damage", 2);
            prop.comment = "Change this value to modify the damage taken per suffocation tick";
            prop.setLanguageKey("gc.configgui.suffocationDamage");
            suffocationDamage = prop.getInt(2);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Dungeon Boss Health Modifier", 1.0);
            prop.comment = "Change this if you wish to balance the mod (if you have more powerful weapon mods).";
            prop.setLanguageKey("gc.configgui.dungeonBossHealthMod");
            dungeonBossHealthMod = prop.getDouble(1.0);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Harder Difficulty", false);
            prop.comment = "Set this to true for increased difficulty in modpacks (see forum for more info).";
            prop.setLanguageKey("gc.configgui.hardMode");
            hardMode = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Enable Sealed edge checks", true);
            prop.comment = "If this is enabled, areas sealed by Oxygen Sealers will run a seal check when the player breaks or places a block (or on block updates).  This should be enabled for a 100% accurate sealed status, but can be disabled on servers for performance reasons.";
            prop.setLanguageKey("gc.configgui.enableSealerEdgeChecks");
            enableSealerEdgeChecks = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Alternate recipe for canisters", false);
            prop.comment = "Enable this if the standard canister recipe causes a conflict.";
            prop.setLanguageKey("gc.configgui.alternateCanisterRecipe").setRequiresMcRestart(true);
            alternateCanisterRecipe = prop.getBoolean(false);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "Rocket fuel factor", 1);
            prop.comment = "The normal factor is 1.  Increase this to 2 - 5 if other mods with a lot of oil (e.g. BuildCraft) are installed to increase GC rocket fuel requirement.";
            prop.setLanguageKey("gc.configgui.rocketFuelFactor");
            rocketFuelFactor = prop.getInt(1);
            propOrder.add(prop.getName());

            config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder);

            if (config.hasChanged())
            {
View Full Code Here

    {
        List<String> propOrder = new ArrayList<String>();

        try
        {
            Property prop;

            if (!config.isChild)
            {
                if (load)
                {
                    config.load();
                }
            }

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "dimensionIDAsteroids", -30);
            prop.comment = "Dimension ID for Asteroids";
            prop.setLanguageKey("gc.configgui.dimensionIDAsteroids").setRequiresMcRestart(true);
            dimensionIDAsteroids = prop.getInt();
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntitySmallAsteroid", 180);
            prop.comment = "Entity ID for Small Asteroid, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntitySmallAsteroid").setRequiresMcRestart(true);
            idEntitySmallAsteroid = prop.getInt(180);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityGrappleHook", 181);
            prop.comment = "Entity ID for Grapple Hook, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityGrappleHook").setRequiresMcRestart(true);
            idEntityGrappleHook = prop.getInt(181);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityTier3Rocket", 182);
            prop.comment = "Entity ID for Tier 3 Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityTier3Rocket").setRequiresMcRestart(true);
            idEntityTier3Rocket = prop.getInt(182);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityEntryPod", 183);
            prop.comment = "Entity ID for Cargo Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityEntryPod").setRequiresMcRestart(true);
            idEntityEntryPod = prop.getInt(183);
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_SCHEMATIC, "idSchematicRocketT3", 4);
            prop.comment = "Schematic ID for Tier 3 Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idSchematicRocketT3");
            idSchematicRocketT3 = prop.getInt(4);
            propOrder.add(prop.getName());

            config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder);

            if (config.hasChanged())
            {
View Full Code Here

    return !modsForbidden.contains(modid) && !blocksForbidden.contains(name);
  }

  public static void readConfiguration (Configuration conf) {
    Property excludedMods = conf.get(Configuration.CATEGORY_GENERAL, "builder.excludedMods", new String [0],
        "mods that should be excluded from the builder.");
    Property excludedBlocks = conf.get(Configuration.CATEGORY_GENERAL, "builder.excludedBlocks", new String [0],
        "blocks that should be excluded from the builder.");

    for (String id : excludedMods.getStringList()) {
      String strippedId = JavaTools.stripSurroundingQuotes(id.trim());

      if (strippedId.length() > 0) {
        modsForbidden.add(strippedId);
      }
    }

    for (String id : excludedBlocks.getStringList()) {
      String strippedId = JavaTools.stripSurroundingQuotes(id.trim());

      if (strippedId.length() > 0) {
        blocksForbidden.add(strippedId);
      }
View Full Code Here

    {
        List<String> propOrder = new ArrayList<String>();

        try
        {
            Property prop;

            if (!config.isChild)
            {
                if (load)
                {
                    config.load();
                }
            }

            prop = config.get(Constants.CONFIG_CATEGORY_DIMENSIONS, "dimensionIDMars", -29);
            prop.comment = "Dimension ID for Mars";
            prop.setLanguageKey("gc.configgui.dimensionIDMars").setRequiresMcRestart(true);
            dimensionIDMars = prop.getInt();
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityCreeperBoss", 171);
            prop.comment = "Entity ID for Evolved Creeper Boss, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityCreeperBoss").setRequiresMcRestart(true);
            idEntityCreeperBoss = prop.getInt(171);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityProjectileTNT", 172);
            prop.comment = "Entity ID for Projectile TNT, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityProjectileTNT").setRequiresMcRestart(true);
            idEntityProjectileTNT = prop.getInt(172);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntitySpaceshipTier2", 173);
            prop.comment = "Entity ID for Tier 2 Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntitySpaceshipTier2").setRequiresMcRestart(true);
            idEntitySpaceshipTier2 = prop.getInt(173);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntitySludgeling", 174);
            prop.comment = "Entity ID for Sludgeling, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntitySludgeling").setRequiresMcRestart(true);
            idEntitySludgeling = prop.getInt(174);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntitySlimeling", 175);
            prop.comment = "Entity ID for Slimeling, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntitySlimeling").setRequiresMcRestart(true);
            idEntitySlimeling = prop.getInt(175);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityTerraformBubble", 176);
            prop.comment = "Entity ID for Terraform Bubble, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityTerraformBubble").setRequiresMcRestart(true);
            idEntityTerraformBubble = prop.getInt(176);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityLandingBalloons", 177);
            prop.comment = "Entity ID for Landing Balloons, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityLandingBalloons").setRequiresMcRestart(true);
            idEntityLandingBalloons = prop.getInt(177);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_ENTITIES, "idEntityCargoRocket", 178);
            prop.comment = "Entity ID for Cargo Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idEntityCargoRocket").setRequiresMcRestart(true);
            idEntityCargoRocket = prop.getInt(178);
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_SCHEMATIC, "idSchematicRocketT2", 2);
            prop.comment = "Schematic ID for Tier 2 Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idSchematicRocketT2");
            idSchematicRocketT2 = prop.getInt(2);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_SCHEMATIC, "idSchematicCargoRocket", 3);
            prop.comment = "Schematic ID for Cargo Rocket, must be unique.";
            prop.setLanguageKey("gc.configgui.idSchematicCargoRocket");
            idSchematicCargoRocket = prop.getInt(3);
            propOrder.add(prop.getName());

            //

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "launchControllerChunkLoad", true);
            prop.comment = "Whether or not the launch controller acts as a chunk loader. Will cause issues if disabled!";
            prop.setLanguageKey("gc.configgui.launchControllerChunkLoad");
            launchControllerChunkLoad = prop.getBoolean(true);
            propOrder.add(prop.getName());

            prop = config.get(Constants.CONFIG_CATEGORY_GENERAL, "launchControllerAllDims", false);
            prop.comment = "May rarely cause issues if enabled, depends on how the other mod's dimensions are.";
            prop.setLanguageKey("gc.configgui.launchControllerAllDims");
            launchControllerAllDims = prop.getBoolean(false);
            propOrder.add(prop.getName());

            config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder);

            if (config.hasChanged())
            {
View Full Code Here

TOP

Related Classes of net.minecraftforge.common.config.Property

Copyright © 2018 www.massapicom. 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.