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

The following examples show how to use net.minecraftforge.common.config.Configuration#getFloat() . 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: Foliage.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void setupConfiguration(Configuration config, String categoryId) {
	fFreq = config.getFloat("foliageFreq", categoryId, 50f, 1f, 1000f, "Foliage noise pattern frequency (higher values = larger pattern)");
	fMult = config.getFloat("foliageMult", categoryId, 7f, -50f, 50f, "Foliage noise pattern multiplier (higher values = stronger effect)");
	fAdd = config.getFloat("foliageAdd", categoryId, 10f, -50f, 50f, "Foliage noise pattern bias (higher values = lighter colors");
	
	wFreq = config.getFloat("waterFreq", categoryId, 50f, 1f, 1000f, "Water noise pattern frequency (higher values = larger pattern)");
	wMult = config.getFloat("waterMult", categoryId, 14f, -50f, 50f, "Water noise pattern multiplier (higher values = stronger effect)");
	wAdd = config.getFloat("waterAdd", categoryId, 15f, -50f, 50f, "Water noise pattern bias (higher values = lighter colors");
}
 
Example 3
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 4
Source File: SubModTightPants.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) {
	
   	spawnChance = config.getFloat("spawnChance", categoryId, 0.005f, 0f, 1f, "The chance of a mob spawning with tight pants.");
}
 
Example 5
Source File: InfinitePain.java    From CommunityMod with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public void setupConfiguration(Configuration config, String category) {
	minTriggerHeight = config.getInt("min_trigger_height", category, minTriggerHeight, 0, Integer.MAX_VALUE, "The minimum height to fall initially in order to trigger infinite fall");
	heightToAdd = config.getInt("height_to_add", category, heightToAdd, Integer.MIN_VALUE, Integer.MAX_VALUE, "Height that will be added to the world height for the infinite fall teleport");
	damageOnImpact = config.getFloat("damage_on_impact", category, damageOnImpact, 0, Float.MAX_VALUE, "Amount of damage to deal when impacting a block above you");
}