Java Code Examples for net.minecraftforge.common.config.Configuration#addCustomCategoryComment()

The following examples show how to use net.minecraftforge.common.config.Configuration#addCustomCategoryComment() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OilGeneratorFix.java    From NewHorizonsCoreMod with GNU General Public License v3.0 6 votes vote down vote up
public OilConfig( Configuration pConfigObject )
{
  pConfigObject.addCustomCategoryComment( "ModFixes.OilGen", "The OilgenChance is based on height of the biome. On high-y biomes, the basic chance is divided by 2, on low-y biomes like oceans, it is multiplied by 1.8.\nThe multiplier set here for -OilBoostBiomes- Biomes is applied after those multipliers are set." );
  OilFixEnabled = pConfigObject.getBoolean( "GenerateOil", "ModFixes", OilFixEnabled, "Set to true to enable OilSpawn from this Mod. Make sure to disable Oil-Spawn in BuildCraft if you do" );
  OilDepostMinDistance = pConfigObject.getInt( "OilDepostMinDistance", "ModFixes.OilGen", OilDepostMinDistance, 0, 1024, "The minimum distance of 2 Oil-Deposits in chunks. Modulo-Based; A 2 here means an deposit can only spawn in chunks that have a number that is a multiple of 2 (Chunknumber * 16 = X/Z coord)" );
  OilSphereChance = pConfigObject.getFloat( "OilSphereChance", "ModFixes.OilGen", (float) OilSphereChance, 0.0F, 2000F, "General OilGen factor" );
  OilSphereMinRadius = pConfigObject.getInt( "OilSphereMinRadius", "ModFixes.OilGen", OilSphereMinRadius, 0, 20, "The minimum radius of an underground OilSphere" );
  OilSphereMaxSize = pConfigObject.getInt( "OilSphereMaxSize", "ModFixes.OilGen", OilSphereMaxSize, 3, 50, "The maximum radius of an underground OilSphere. The final size is calculated by OilSphereMinRadius + Random(OilSphereMaxSize-OilSphereMinRadius)" );
  OilDepositThresholdMedium = pConfigObject.getInt( "OilDepositThresholdMedium", "ModFixes.OilGen", OilDepositThresholdMedium, 0, 100, "Threshold at which an oil-deposit will be considered as 'medium' and the fountain will be higher and thicker." );
  OilDepositThresholdLarge = pConfigObject.getInt( "OilDepositThresholdLarge", "ModFixes.OilGen", OilDepositThresholdLarge, 0, 100, "Threshold at which an oil-deposit will be considered as 'large' and the fountain will be higher and thicker." );
  OilFountainSizeSmall = pConfigObject.getInt( "OilFountainSizeSmall", "ModFixes.OilGen", OilFountainSizeSmall, 0, 100, "Visible height of the fountain above the oil-deposit for MEDIUM deposits" );
  OilFountainSizeLarge = pConfigObject.getInt( "OilFountainSizeLarge", "ModFixes.OilGen", OilFountainSizeLarge, 0, 100, "Visible height of the fountain above the oil-deposit for LARGE deposits" );
  OilBiomeBoostFactor = pConfigObject.getFloat( "OilBiomeBoostFactor", "ModFixes.OilGen", (float) OilBiomeBoostFactor, 0.0F, 50.0F, "Boost factor of oil spheres in certain Biomes that are listed in -OilBoostBiomes-" );

  OilDimensionWhitelist = parseStringListToIntList( pConfigObject.getStringList( "OilDimensionWhitelist", "ModFixes.OilGen", new String[] { "0" }, "List DimensionIDs (Numbers only; One per line!) here where the OilGenerator should do its work" ) );
  OilBiomeIDBlackList = parseStringListToIntList( pConfigObject.getStringList( "OilBiomeIDBlackList", "ModFixes.OilGen", new String[] {}, "List BiomeIDs (Numbers only; One per line!) where no oil should be generated" ) );
  OilBoostBiomes = parseStringListToIntList( pConfigObject.getStringList( "OilBoostBiomes", "ModFixes.OilGen", new String[] {}, "List BiomeIDs (Numbers only; One per line!) where the boost multiplicator is applied. Leave empty to disable Biome-Boost" ) );

}
 
Example 2
Source File: Config.java    From Logistics-Pipes-2 with MIT License 5 votes vote down vote up
/**
 * Provides Values of Network Category
 * @param cfg Config Provider
 */
private static void initNetwork(Configuration cfg){
	cfg.addCustomCategoryComment(CAT_NETWORK, "Network specific settings:");
	
	baseNetCost = cfg.getFloat("baseNetworkCost", CAT_NETWORK, 30.0f, 5.0f, 10000.0f, "The Base energy consumption of the Network Core");
	routedIdleCost = cfg.getFloat("routedIdleCost", CAT_NETWORK, 4.0f, 1.0f, 100.0f, "The idle power consumption of a Routed Pipe in a Network, between 1 and 100 RF/t");
}
 
Example 3
Source File: Config.java    From Logistics-Pipes-2 with MIT License 5 votes vote down vote up
/**
 * Provides Values of World Category
 * @param cfg Config Provider
 */
private static void initWorld(Configuration cfg){
	cfg.addCustomCategoryComment(CAT_WORLD, "World settings:");
	
	genTitanium = cfg.getBoolean("genTitanium", CAT_WORLD, true, "Wether or not to Worldgen Titanium. If off, its recommended to disable the Industrial Tier Pipes");
	oreRutile[0] = cfg.getInt("rutileVeinSizeMax", CAT_WORLD, 4, 2, 6, "Maximum Vein size of Rutile Ore clusters.(Between 2 and 6");
	oreRutile[1] = cfg.getInt("rutileMinY", CAT_WORLD, 8, 8, 16, "Minimum Y height at wich Rutile Spawns.(Between 8 and 16)");
	oreRutile[2] = cfg.getInt("rutileMaxY", CAT_WORLD, 30, 20, 45, "Maximum Y height at wich Rutile Spawns.(Between 20 and 40");
	oreRutile[3] = cfg.getInt("rutileChunkOccurence", CAT_WORLD, 5, 1, 10, "Number of times Rutile can Spawn within a single chunk.(Between 1 and 10");
	oreRutile[4] = cfg.getInt("rutileSPawnWeight", CAT_WORLD, 80, 10, 100, "Spawn Weight of Rutile Ore.(Between 10 and 100)");
	
	retroGen = cfg.getBoolean("retroGen", CAT_WORLD, false, "Wether or not Post-Creation World Gen should be performed.");
	retrogenRemaining = cfg.getBoolean("retrogenRemianing", CAT_WORLD, false, "Wether or not there are still Chunks to be retro Generated with LP Ore. DO NOT TOUCH THIS!");
	retroGenFlagLog = cfg.getBoolean("retrogenFlagLogging", CAT_WORLD, true, "Wether or not you want LP to log wich Chunks it flags for Retrogen. This can be a bit spammy!");
}
 
Example 4
Source File: ClientProxy.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
@Override
public void loadUILayout(Configuration config) {
	final String CLIENT = "Client";
	
	zmaster587.advancedRocketry.api.Configuration.lockUI = config.get(CLIENT, "lockUI", true, "If UI is not locked, the middle mouse can be used to drag certain AR UIs around the screen, positions are saved on hitting quit in the menu").getBoolean();
	
	config.addCustomCategoryComment(CLIENT, "UI locations can by set by clicking and dragging the middle mouse button ingame");
	RocketEventHandler.suitPanel.setRawX(config.get(CLIENT, "suitPanelX", 8).getInt());
	RocketEventHandler.suitPanel.setRawY(config.get(CLIENT, "suitPanelY", 8).getInt());
	RocketEventHandler.suitPanel.setSizeModeX(config.get(CLIENT, "suitPanelModeX", -1).getInt());
	RocketEventHandler.suitPanel.setSizeModeY(config.get(CLIENT, "suitPanelModeY", -1).getInt());
	
	RocketEventHandler.oxygenBar.setRawX(config.get(CLIENT, "oxygenBarX", -8).getInt());
	RocketEventHandler.oxygenBar.setRawY(config.get(CLIENT, "oxygenBarY", 57).getInt());
	RocketEventHandler.oxygenBar.setSizeModeX(config.get(CLIENT, "oxygenBarModeX", 0).getInt());
	RocketEventHandler.oxygenBar.setSizeModeY(config.get(CLIENT, "oxygenBarModeY", 1).getInt());
	
	RocketEventHandler.hydrogenBar.setRawX(config.get(CLIENT, "hydrogenBarX", -8).getInt());
	RocketEventHandler.hydrogenBar.setRawY(config.get(CLIENT, "hydrogenBarY", 74).getInt());
	RocketEventHandler.hydrogenBar.setSizeModeX(config.get(CLIENT, "hydrogenBarModeX", 0).getInt());
	RocketEventHandler.hydrogenBar.setSizeModeY(config.get(CLIENT, "hydrogenBarModeY", 1).getInt());
	
	RocketEventHandler.atmBar.setRawX(config.get(CLIENT, "atmBarX", 8).getInt());
	RocketEventHandler.atmBar.setRawY(config.get(CLIENT, "atmBarY", 27).getInt());
	RocketEventHandler.atmBar.setSizeModeX(config.get(CLIENT, "atmBarModeX", -1).getInt());
	RocketEventHandler.atmBar.setSizeModeY(config.get(CLIENT, "atmBarModeY", 1).getInt());
}
 
Example 5
Source File: Config.java    From Logistics-Pipes-2 with MIT License 4 votes vote down vote up
/**
 * Provide Values of General Category
 * @param cfg Config Provider
 */
private static void initGeneral(Configuration cfg){
	cfg.addCustomCategoryComment(CAT_GENERAL, "General settings:");
	
	allowTierTwo = cfg.getBoolean("allowT2", CAT_GENERAL, true, "Wether or not to allow the Crafting of Industrial Grade Pipes.");
}
 
Example 6
Source File: ConfigReader.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static void loadConfigItemControl(Configuration conf)
{
    Property prop;
    currentCategory = "DisableBlocks";
    currentRequiresMcRestart = true;

    conf.addCustomCategoryComment(currentCategory, "Completely disable blocks (don't register them to the game.)\n" +
            "Note that machines are grouped together and identified by the meta value. You can't disable just a specific meta value.");

    // Block disable
    Configs.disableBlockASU           = getProp("disableBlockAdjustableStorageUnit", false).getBoolean();
    Configs.disableBlockBarrel        = getProp("disableBlockBarrel", false).getBoolean();
    Configs.disableBlockDrawbridge    = getProp("disableBlockDrawbridge", false).getBoolean();
    Configs.disableBlockEnderElevator = getProp("disableBlockEnderElevator", false).getBoolean();
    Configs.disableBlockFloor         = getProp("disableBlockFloor", false).getBoolean();
    Configs.disableBlockInserter      = getProp("disableBlockInserter", false).getBoolean();
    Configs.disableBlockMolecularExciter = getProp("disableBlockMolecularExciter", false).getBoolean();
    Configs.disableBlockPhasing       = getProp("disableBlockPhasing", false).getBoolean();
    Configs.disableBlockPortal        = getProp("disableBlockPortal", false).getBoolean();
    Configs.disableBlockPortalFrame   = getProp("disableBlockPortalFrame", false).getBoolean();
    Configs.disableBlockPortalPanel   = getProp("disableBlockPortalPanel", false).getBoolean();
    Configs.disableBlockSoundBlock    = getProp("disableBlockSoundBlock", false).getBoolean();

    prop = getProp("disableBlockEnergyBridge", false);
    prop.setComment("Meta values: 0 = Energy Bridge Resonator; 1 = Energy Bridge Receiver; 2 = Energy Bridge Transmitter");
    Configs.disableBlockEnergyBridge = prop.getBoolean();

    prop = getProp("disableBlockMachine_0", false);
    prop.setComment("Info: Machine_0 meta values: 0 = Ender Furnace");
    Configs.disableBlockMachine_0 = prop.getBoolean();

    prop = getProp("disableBlockMachine_1", false);
    prop.setComment("Info: Machine_1 meta values: 0 = Ender Infuser; 1 = Tool Workstation, 2 = Creation Station");
    Configs.disableBlockMachine_1 = prop.getBoolean();

    prop = getProp("disableBlockStorage_0", false);
    prop.setComment("Meta values: 0..2 = Memory Chests, 3..6 = Handy Chests, 7 = Junk Storage Unit");
    Configs.disableBlockStorage_0 = prop.getBoolean();

    prop = getProp("disableBlockMassiveStorageUnit", false);
    prop.setComment("Meta values: 0 = Massive Storage Unit, 1 = Massive Storage Bundle");
    Configs.disableBlockMSU = prop.getBoolean();

    currentCategory = "DisableItems";
    conf.addCustomCategoryComment(currentCategory, "Completely disable items (don't register them to the game.)\n" +
            "Note that some items are grouped together using the damage value (and/or NBT data) to identify them.\n" +
            "You can't disable a specific damage value only (so that existing items would vanish).");

    // Item disable
    Configs.disableItemCraftingPart           = getProp("disableItemCraftingPart", false).getBoolean();
    Configs.disableItemEnderCapacitor         = getProp("disableItemEnderCapacitor", false).getBoolean();
    Configs.disableItemLinkCrystal            = getProp("disableItemLinkCrystal", false).getBoolean();

    Configs.disableItemBuildersWand           = getProp("disableItemBuildersWand", false).getBoolean();
    Configs.disableItemEnderArrow             = getProp("disableItemEnderArrow", false).getBoolean();
    Configs.disableItemEnderBag               = getProp("disableItemEnderBag", false).getBoolean();
    Configs.disableItemEnderBow               = getProp("disableItemEnderBow", false).getBoolean();
    Configs.disableItemEnderBucket            = getProp("disableItemEnderBucket", false).getBoolean();
    Configs.disableItemEnderLasso             = getProp("disableItemEnderLasso", false).getBoolean();
    Configs.disableItemEnderPearl             = getProp("disableItemEnderPearl", false).getBoolean();
    Configs.disableItemEnderPorter            = getProp("disableItemEnderPorter", false).getBoolean();
    Configs.disableItemEnderSword             = getProp("disableItemEnderSword", false).getBoolean();
    Configs.disableItemEnderTools             = getProp("disableItemEnderTools", false).getBoolean();
    Configs.disableItemHandyBag               = getProp("disableItemHandyBag", false).getBoolean();
    Configs.disableItemIceMelter              = getProp("disableItemIceMelter", false).getBoolean();
    Configs.disableItemInventorySwapper       = getProp("disableItemInventorySwapper", false).getBoolean();
    Configs.disableItemLivingManipulator      = getProp("disableItemLivingManipulator", false).getBoolean();
    Configs.disableItemMobHarness             = getProp("disableItemMobHarness", false).getBoolean();
    Configs.disableItemNullifier              = getProp("disableItemNullifier", false).getBoolean();
    Configs.disableItemPetContract            = getProp("disableItemPetContract", false).getBoolean();
    Configs.disableItemPickupManager          = getProp("disableItemPickupManager", false).getBoolean();
    Configs.disableItemQuickStacker           = getProp("disableItemQuickStacker", false).getBoolean();
    Configs.disableItemPortalScaler           = getProp("disableItemPortalScaler", false).getBoolean();
    Configs.disableItemRuler                  = getProp("disableItemRuler", false).getBoolean();
    Configs.disableItemSyringe                = getProp("disableItemSyringe", false).getBoolean();
    Configs.disableItemVoidPickaxe            = getProp("disableItemVoidPickaxe", false).getBoolean();

    // Recipe disable
    currentCategory = "DisableRecipes";
    conf.addCustomCategoryComment(currentCategory, "Disable item recipes");

    // Blocks
    Configs.disableRecipeEnderElevator        = getProp("disableRecipeEnderElevator", false).getBoolean();
}