Package net.minecraftforge.common.config

Examples of net.minecraftforge.common.config.Property


    allowMining = genCat.get("mining.enabled", true, "disables the recipes for automated mining machines");
    quarryOneTimeUse = genCat.get("quarry.one.time.use", false, "Quarry cannot be picked back up after placement");
    miningMultiplier = genCat.get("mining.cost.multipler", 1F, 1F, 10F, "cost multiplier for mining operations, range (1.0 - 10.0)\nhigh values may render engines incapable of powering machines directly");
    miningDepth = genCat.get("mining.depth", 2, 256, 256, "how far below the machine can mining machines dig, range (2 - 256), default 256");

    Property pumpList = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "pumping.controlList", DefaultProps.PUMP_DIMENSION_LIST);
    pumpList.comment = "Allows admins to whitelist or blacklist pumping of specific fluids in specific dimensions.\n"
        + "Eg. \"-/-1/Lava\" will disable lava in the nether. \"-/*/Lava\" will disable lava in any dimension. \"+/0/*\" will enable any fluid in the overworld.\n"
        + "Entries are comma seperated, banned fluids have precedence over allowed ones."
        + "Default is \"+/*/*,+/-1/Lava\" - the second redundant entry (\"+/-1/lava\") is there to show the format.";
    pumpDimensionList = new PumpDimensionList(pumpList.getString());

    if (BuildCraftCore.mainConfiguration.hasChanged()) {
      BuildCraftCore.mainConfiguration.save();
    }

View Full Code Here


  public boolean get(String tag, boolean defaultValue, String comment) {
    return get(tag, defaultValue, false, comment);
  }

  public boolean get(String tag, boolean defaultValue, boolean reset, String comment) {
    Property prop = config.get(cat, tag, defaultValue);
    prop.comment = COMMENT_PREFIX + comment.replace("{t}", tag) + COMMENT_SUFFIX;

    boolean ret = parseBoolean(prop, defaultValue);

    if (reset) {
      prop.set(defaultValue);
    }

    return ret;
  }
View Full Code Here

    return ret;
  }

  public int get(String tag, int defaultValue, String comment) {
    Property prop = config.get(cat, tag, defaultValue);
    prop.comment = COMMENT_PREFIX + comment.replace("{t}", tag) + COMMENT_SUFFIX;
    return parseInteger(prop, defaultValue);
  }
View Full Code Here

    prop.comment = COMMENT_PREFIX + comment.replace("{t}", tag) + COMMENT_SUFFIX;
    return parseInteger(prop, defaultValue);
  }

  public int get(String tag, int min, int defaultValue, int max, String comment) {
    Property prop = config.get(cat, tag, defaultValue);
    prop.comment = COMMENT_PREFIX + comment.replace("{t}", tag) + COMMENT_SUFFIX;
    int parsed = parseInteger(prop, defaultValue);
    int clamped = Math.max(parsed, min);
    clamped = Math.min(clamped, max);
    if (clamped != parsed) {
      prop.set(clamped);
    }
    return clamped;
  }
View Full Code Here

    }
    return clamped;
  }

  public float get(String tag, float min, float defaultValue, float max, String comment) {
    Property prop = config.get(cat, tag, defaultValue);
    prop.comment = COMMENT_PREFIX + comment.replace("{t}", tag) + COMMENT_SUFFIX;
    double parsed = parseDouble(prop, defaultValue);
    double clamped = Math.max(parsed, min);
    clamped = Math.min(clamped, max);
    if (clamped != parsed) {
      prop.set(clamped);
    }
    return (float) clamped;
  }
View Full Code Here

    for (int i = 0; i < blueprintLibraryInput.length; ++i) {
      blueprintLibraryInput[i] = JavaTools.stripSurroundingQuotes(replacePathVariables(blueprintLibraryInput[i]));
    }
   
    Property printSchematicList = BuildCraftCore.mainConfiguration.get("debug", "blueprints.printSchematicList", false);
    debugPrintSchematicList = printSchematicList.getBoolean();

    if (BuildCraftCore.mainConfiguration.hasChanged()) {
      BuildCraftCore.mainConfiguration.save();
    }
View Full Code Here

            if(!ItemPlasticPlants.NEEDS_GENERATION[i]) continue;
            double defaultValue = i == ItemPlasticPlants.HELIUM_PLANT_DAMAGE || i == ItemPlasticPlants.FIRE_FLOWER_DAMAGE ? 15.0 : 2.0;
            configPlantGenerationChance[i] = config.get("plant_generation_options", ItemPlasticPlants.PLANT_NAMES[i], defaultValue).getDouble() / 100;
        }

        Property property = config.get(Configuration.CATEGORY_GENERAL, "Compressed Iron Loss Percentage", 20);
        property.comment = "Loss percentage (on average) of Compressed Iron ingots/blocks when exposed to an explosion.";
        configCompressedIngotLossRate = property.getInt();

        useHelmetModel = config.getBoolean("Use Pneumatic Helmet model", Configuration.CATEGORY_GENERAL, false, "When true, the Pneumatic Helmet will be a model. Warning: this model looks far too good to be in MC");

        property = config.get(Configuration.CATEGORY_GENERAL, "Villager Mechanic ID", 125);
        property.comment = "Villager ID used for the Mechanic Villager. Change when ID collides with an other mod which adds villagers.";
        villagerMechanicID = property.getInt();

        property = config.get("Machine_Properties", "Pneumatic Generator (PneumaticCraft --> IC2) efficiency", 40);
        property.comment = "Changing this value will alter the pressurized air usage of the Pneumatic Generator. The output, EU, will stay the same.";
        pneumaticGeneratorEfficiency = property.getInt();

        property = config.get("machine_properties", "Electric Compressor (IC2 --> PneumaticCraft) efficiency", 40);
        property.comment = "Changing this value will alter the pressurized air production of the Electric Compressor. The input, EU, will stay the same.";
        electricCompressorEfficiency = property.getInt();

        property = config.get("machine_properties", "Pneumatic Engine (PneumaticCraft --> Buildcraft) efficiency", 40);
        property.comment = "Changing this value will alter the pressurized air usage of the Pneumatic Engine. The output, MJ, will stay the same.";
        pneumaticEngineEfficiency = property.getInt();

        property = config.get("machine_properties", "Kinetic Compressor (Buildcraft --> PneumaticCraft) efficiency", 40);
        property.comment = "Changing this value will alter the pressurized air production of the Kinetic Compressor. The input, MJ, will stay the same.";
        kineticCompressorEfficiency = property.getInt();

        property = config.get("machine_properties", "Pneumatic Dynamo (PneumaticCraft --> RF) efficiency", 40);
        property.comment = "Changing this value will alter the pressurized air usage of the Pneumatic Dynamo. The output, RF, will stay the same.";
        pneumaticDynamoEfficiency = property.getInt();

        property = config.get("machine_properties", "Flux Compressor (RF --> PneumaticCraft) efficiency", 40);
        property.comment = "Changing this value will alter the pressurized air production of the Flux Compressor. The input, RF, will stay the same.";
        fluxCompressorEfficiency = property.getInt();

        property = config.get("machine_properties", "Pneumatic Pump (PneumaticCraft --> Hydraulicraft) efficiency", 40);
        property.comment = "Changing this value will alter the hydraulic bar production of the Pneumatic Pump. The input, air, will stay the same.";
        pneumaticPumpEfficiency = property.getInt();

        elevatorBaseBlocksPerBase = config.getInt("Height per Elevator Base", "machine_properties", 4, 1, 256, "The max height of an elevator per stacked Elevator Base.");

        property = config.get(Configuration.CATEGORY_GENERAL, "Block rotate use energy", true);
        property.comment = "When set to false rotating PneumaticCraft blocks doesn't use any energy. This means that the Pneumatic Wrench doesn't use air and that all blocks can be rotated with a Buildcraft Wrench.";
        rotateUseEnergy = property.getBoolean(true);

        property = config.get("advanced", "Convert Multiparts to Blocks", false);
        property.comment = "ONLY SET TO TRUE WHEN YOU KNOW WHAT YOU'RE DOING. When set to true, this will convert any Pressure Tube in the world that was a FMP to its block variant. Handy when you're about to remove FMP from the instance. This will remove any other parts from the block like covers. Exception are tube modules.";
        convertMultipartsToBlocks = property.getBoolean(true);

        enableUpdateChecker = config.get(Configuration.CATEGORY_GENERAL, "Enable Update Checker", true).getBoolean(true);

        enableDroneSuffocationDamage = config.get(Configuration.CATEGORY_GENERAL, "Enable Drone Suffocation Damage", true).getBoolean(true);
        enableCreeperDropExplosion = config.getBoolean("Enable Creeper Explosions on seed drop", Configuration.CATEGORY_GENERAL, true, "When true, Creepers when dropping a Creeper Plant Seed will create a tiny explosion.");
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.