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

The following examples show how to use net.minecraftforge.common.config.Configuration#getBoolean() . 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 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 3
Source File: Dabbbbb.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void setupConfiguration(Configuration config, String categoryId) {
	whenUBoppin = config.getBoolean("when u boppin", categoryId, true, "Makes the dab extra powerful");
}
 
Example 4
Source File: SexyFont.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void setupConfiguration(Configuration config, String categoryId) {
	alwaysSexyTime = config.getBoolean("alwaysSexyFont", categoryId, false, "Should sexyfont always be enabled even if you don't wear the glasses?");
	
	intermittentSexyTime = config.getBoolean("intermittentSexyFont", categoryId, false, "Should the sexy font be pretty flickery?");
}
 
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.");
}