本文整理了Java中net.minecraftforge.common.config.Configuration.getFloat()
方法的一些代码示例,展示了Configuration.getFloat()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getFloat()
方法的具体详情如下:
包路径:net.minecraftforge.common.config.Configuration
类名称:Configuration
方法名:getFloat
暂无
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@Override
public void onConfigChanged(ConfigurationHandler config) {
Galaxy.GALAXY_BUILD_TIME_MULTIPLY = config.config.getFloat("galaxy build time multiply", ConfigurationHandler.CATEGORY_STARMAP, 1, 0, 10, "The multiplier for the building and ship building times");
Galaxy.GALAXY_TRAVEL_TIME_MULTIPLY = config.config.getFloat("galaxy travel time multiply", ConfigurationHandler.CATEGORY_STARMAP, 1, 0, 10, "The multiplier for the ship travel times");
}
代码示例来源:origin: McJtyMods/LostCities
private void initClient(Configuration cfg) {
HORIZON = cfg.getFloat("horizon", categoryClient, inheritFrom.orElse(this).HORIZON, -1f, 256f, "This is used client-side (but only if the client has this mod) to set the height of the horizon");
FOG_RED = cfg.getFloat("fogRed", categoryClient, inheritFrom.orElse(this).FOG_RED, -1f, 1f, "This is used client-side (but only if the client has this mod) for the fog color");
FOG_GREEN = cfg.getFloat("fogGreen", categoryClient, inheritFrom.orElse(this).FOG_GREEN, -1f, 1f, "This is used client-side (but only if the client has this mod) for the fog color");
FOG_BLUE = cfg.getFloat("fogBlue", categoryClient, inheritFrom.orElse(this).FOG_BLUE, -1f, 1f, "This is used client-side (but only if the client has this mod) for the fog color");
FOG_DENSITY = cfg.getFloat("fogDensity", categoryClient, inheritFrom.orElse(this).FOG_DENSITY, -1f, 1f, "This is used client-side (but only if the client has this mod) for the fog density");
}
代码示例来源:origin: SonOfTheStars/Logistics-Pipes-2
/**
* 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");
}
代码示例来源:origin: McJtyMods/DeepResonance
public static void init(Configuration cfg) {
maxResistance = cfg.getInt("maxResistance", CATEGORY_SUPERGEN, maxResistance, 1, 1000000000,
"Maximum resistance (in microticks)");
resistanceDecreasePerPulse = cfg.getInt("resistanceDecreasePerPulse", CATEGORY_SUPERGEN, resistanceDecreasePerPulse, 1, 1000000000,
"How much resistance decreases when a pulse is received (if cooldown is 0)");
resistanceIncreasePerTick = cfg.getInt("resistanceIncreasePerTick", CATEGORY_SUPERGEN, resistanceIncreasePerTick, 1, 1000000000,
"How much resistance increases again when idle");
instabilityHandlingChance = cfg.getFloat("instabilityHandlingChance", CATEGORY_SUPERGEN, instabilityHandlingChance, 0.0f, 1.0f,
"When the crystal has accumulated instability then this is the chance that (at any tick) we actually handle that instability");
instabilityExplosionThresshold = cfg.getFloat("instabilityExplosionThresshold", CATEGORY_SUPERGEN, instabilityExplosionThresshold, 0.0f, 10000000.0f,
"When accumulated instability is handled then we handle a random amount of that instability. When that random amount is greater then this value we cause a massive explosion");
instabilityBigDamageThresshold = cfg.getFloat("instabilityBigDamageThresshold", CATEGORY_SUPERGEN, instabilityBigDamageThresshold, 0.0f, 10000000.0f,
"When accumulated instability is handled then we handle a random amount of that instability. When that random amount is greater then this value we cause big damage on the crystal");
instabilitySmallDamageThresshold = cfg.getFloat("instabilitySmallDamageThresshold", CATEGORY_SUPERGEN, instabilitySmallDamageThresshold, 0.0f, 10000000.0f,
"When accumulated instability is handled then we handle a random amount of that instability. When that random amount is greater then this value we cause minor damage on the crystal");
instabilitySensorThresshold = cfg.getFloat("instabilitySensorThresshold", CATEGORY_SUPERGEN, instabilitySensorThresshold, 0.0f, 10000000.0f,
"The amount of instability in the crystal that corresponds to redstone level 15 in the instability sensor");
}
代码示例来源:origin: CoFH/ThermalExpansion
public static void preInit() {
String category = "Machine.Sawmill";
String comment = "Adjust this value to change the default Log -> Plank Multiplier for this machine.";
logMultiplier = ThermalExpansion.CONFIG.getConfiguration().getFloat("Log -> Plank Multiplier", category, logMultiplier, 1.0F, 8.0F, comment);
}
代码示例来源:origin: McJtyMods/LostCities
private void initCitySpheres(Configuration cfg) {
CITYSPHERE_FACTOR = cfg.getFloat("citySphereFactor", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_FACTOR, 0.1f, 10.0f, "Only used in 'space' landscape. This factor will be multiplied with the radius of the city to calculate the radius of the outer sphere");
CITYSPHERE_CHANCE = cfg.getFloat("citySphereChance", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_CHANCE, 0.0f, 1.0f, "The chance that a city sphere will be generated");
CITYSPHERE_SURFACE_VARIATION = cfg.getFloat("sphereSurfaceVariation", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_SURFACE_VARIATION, 0.0f, 1.0f, "Smaller numbers make the surface inside a city sphere more varied");
CITYSPHERE_OUTSIDE_SURFACE_VARIATION = cfg.getFloat("outsideSurfaceVariation", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_OUTSIDE_SURFACE_VARIATION, 0.0f, 1.0f, "Smaller numbers make the surface outside a city sphere more varied");
CITYSPHERE_MONORAIL_CHANCE = cfg.getFloat("monorailChance", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_MONORAIL_CHANCE, 0.0f, 1.0f, "The chance that a city will have a monorail connection in a certain direction. There will only be an actual connection if there is a city in that direction that also wants a monorail");
CITYSPHERE_LANDSCAPE_OUTSIDE = cfg.getBoolean("landscapeOutside", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_LANDSCAPE_OUTSIDE,
"If this is true then there will be a landscape outside the city spheres");
CITYSPHERE_ONLY_PREDEFINED = cfg.getBoolean("onlyPredefined", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_ONLY_PREDEFINED,
"If this is true then only predefined spheres are generated");
CITYSPHERE_OUTSIDE_GROUNDLEVEL = cfg.getInt("outsideGroundLevel", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_OUTSIDE_GROUNDLEVEL, -1, 256, "Ground level for outside city spheres (DEPRECATED, USE GROUNDLEVEL OF OTHER PROFILE)");
CITYSPHERE_OUTSIDE_PROFILE = cfg.getString("outsideProfile", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_OUTSIDE_PROFILE, "An optional profile to use for the outside world");
CITYSPHERE_MONORAIL_HEIGHT_OFFSET = cfg.getInt("monorailOffset", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_MONORAIL_HEIGHT_OFFSET, -100, 100, "Offset compared to main height");
CITYSPHERE_SINGLE_BIOME = cfg.getBoolean("singleBiome", categoryCitySpheres, inheritFrom.orElse(this).CITYSPHERE_SINGLE_BIOME,
"If this is true then every city sphere will be limited to one (random) biome");
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@Override
public void onConfigChanged(ConfigurationHandler config) {
chance = config.config.getFloat(ConfigurationHandler.KEY_GRAVITATIONAL_ANOMALY_SPAWN_CHANCE, String.format("%s.gravitational_anomaly", ConfigurationHandler.CATEGORY_WORLD_GEN), defaultChance, 0, 1, "Spawn Chance of Gravity Anomaly pre chunk");
loadWhitelist(config);
loadBlacklist(config);
}
代码示例来源:origin: McJtyMods/LostCities
private void initCities(Configuration cfg) {
CITY_CHANCE = cfg.getFloat("cityChance", categoryCities, inheritFrom.orElse(this).CITY_CHANCE, 0.0f, 1.0f, "The chance this chunk will be the center of a city");
CITY_MINRADIUS = cfg.getInt("cityMinRadius", categoryCities, inheritFrom.orElse(this).CITY_MINRADIUS, 1, 10000, "The minimum radius of a city");
CITY_MAXRADIUS = cfg.getInt("cityMaxRadius", categoryCities, inheritFrom.orElse(this).CITY_MAXRADIUS, 1, 10000, "The maximum radius of a city");
CITY_THRESSHOLD = cfg.getFloat("cityThresshold", categoryCities, inheritFrom.orElse(this).CITY_THRESSHOLD, 0.0f, 1.0f, "The center and radius of a city define a sphere. " +
"This thresshold indicates from which point a city is considered a city. " +
"This is important for calculating where cities are based on overlapping city circles (where the city thressholds are added)");
CITY_BIOME_FACTORS = cfg.getStringList("cityBiomeFactors", categoryCities, inheritFrom.orElse(this).CITY_BIOME_FACTORS, "List of biomes with a factor to affect the city factor in that biome. Using the value 0 you can disable city generation in biomes");
CITY_DEFAULT_BIOME_FACTOR = cfg.getFloat("cityBiomeFactorDefault", categoryCities, inheritFrom.orElse(this).CITY_DEFAULT_BIOME_FACTOR, 0.0f, 1.0f, "The default biome factor which is used if your biome is not specified in 'cityBiomeFactors'");
CITY_LEVEL0_HEIGHT = cfg.getInt("cityLevel0Height", categoryCities, inheritFrom.orElse(this).CITY_LEVEL0_HEIGHT, 1, 255,
"Below this chunk height cities will be level 0");
CITY_LEVEL1_HEIGHT = cfg.getInt("cityLevel1Height", categoryCities, inheritFrom.orElse(this).CITY_LEVEL1_HEIGHT, 1, 255,
"Below this chunk height cities will be level 1");
CITY_LEVEL2_HEIGHT = cfg.getInt("cityLevel2Height", categoryCities, inheritFrom.orElse(this).CITY_LEVEL2_HEIGHT, 1, 255,
"Below this chunk height cities will be level 2");
CITY_LEVEL3_HEIGHT = cfg.getInt("cityLevel3Height", categoryCities, inheritFrom.orElse(this).CITY_LEVEL3_HEIGHT, 1, 255,
"Below this chunk height cities will be level 3");
}
代码示例来源:origin: McJtyMods/LostCities
private void initExplosions(Configuration cfg) {
DEBRIS_TO_NEARBYCHUNK_FACTOR = cfg.getInt("debrisToNearbyChunkFactor", categoryExplosions, inheritFrom.orElse(this).DEBRIS_TO_NEARBYCHUNK_FACTOR, 1, 10000, "A factor that determines how much debris will overflow from nearby damaged chunks. Bigger numbers mean less debris");
DESTROY_LONE_BLOCKS_FACTOR = cfg.getFloat("destroyLoneBlocksFactor", categoryExplosions, inheritFrom.orElse(this).DESTROY_LONE_BLOCKS_FACTOR, 0.0f, 1.0f, "When a section of blocks in in an explosion the generator will count the number of " +
"blocks that are connected. The number of connections divided by the total number of blocks in a connected section is compared with this number. " +
"If it is smaller then the section of blocks is destroyed or moved down with gravity");
DESTROY_OR_MOVE_CHANCE = cfg.getFloat("destroyOrMoveChance", categoryExplosions, inheritFrom.orElse(this).DESTROY_OR_MOVE_CHANCE, 0.0f, 1.0f, "When a section of blocks is to be moved or destroyed " +
"this chance gives the chance of removal (as opposed to moving with gravity)");
DESTROY_SMALL_SECTIONS_SIZE = cfg.getInt("destroySmallSectionsSize", categoryExplosions, inheritFrom.orElse(this).DESTROY_SMALL_SECTIONS_SIZE, 1, 5000, "A section of blocks that is about to be moved or destroyed " +
"is always destroyed if it is smaller then this size");
EXPLOSION_CHANCE = cfg.getFloat("explosionChance", categoryExplosions, inheritFrom.orElse(this).EXPLOSION_CHANCE, 0.0f, 1.0f, "The chance that a chunk will contain an explosion");
EXPLOSION_MINRADIUS = cfg.getInt("explosionMinRadius", categoryExplosions, inheritFrom.orElse(this).EXPLOSION_MINRADIUS, 1, 1000, "The minimum radius of an explosion");
EXPLOSION_MAXRADIUS = cfg.getInt("explosionMaxRadius", categoryExplosions, inheritFrom.orElse(this).EXPLOSION_MAXRADIUS, 1, 3000, "The maximum radius of an explosion");
EXPLOSION_MINHEIGHT = cfg.getInt("explosionMinHeight", categoryExplosions, inheritFrom.orElse(this).EXPLOSION_MINHEIGHT, 1, 256, "The minimum height of an explosion");
EXPLOSION_MAXHEIGHT = cfg.getInt("explosionMaxHeight", categoryExplosions, inheritFrom.orElse(this).EXPLOSION_MAXHEIGHT, 1, 256, "The maximum height of an explosion");
MINI_EXPLOSION_CHANCE = cfg.getFloat("miniExplosionChance", categoryExplosions, inheritFrom.orElse(this).MINI_EXPLOSION_CHANCE, 0.0f, 1.0f, "The chance that a chunk will contain a mini explosion");
MINI_EXPLOSION_MINRADIUS = cfg.getInt("miniExplosionMinRadius", categoryExplosions, inheritFrom.orElse(this).MINI_EXPLOSION_MINRADIUS, 1, 1000, "The minimum radius of a mini explosion");
MINI_EXPLOSION_MAXRADIUS = cfg.getInt("miniExplosionMaxRadius", categoryExplosions, inheritFrom.orElse(this).MINI_EXPLOSION_MAXRADIUS, 1, 3000, "The maximum radius of a mini explosion");
MINI_EXPLOSION_MINHEIGHT = cfg.getInt("miniExplosionMinHeight", categoryExplosions, inheritFrom.orElse(this).MINI_EXPLOSION_MINHEIGHT, 1, 256, "The minimum height of a mini explosion");
MINI_EXPLOSION_MAXHEIGHT = cfg.getInt("miniExplosionMaxHeight", categoryExplosions, inheritFrom.orElse(this).MINI_EXPLOSION_MAXHEIGHT, 1, 256, "The maximum height of a mini explosion");
EXPLOSIONS_IN_CITIES_ONLY = cfg.getBoolean("explosionsInCitiesOnly", categoryExplosions, inheritFrom.orElse(this).EXPLOSIONS_IN_CITIES_ONLY,
"If this is true the center of an explosion can only be in a city (the blast can still affect non-city chunks)");
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@Override
public void onConfigChanged(ConfigurationHandler config) {
StarPrefixChance = config.config.getFloat("name_prefix_chance", ConfigurationHandler.CATEGORY_STARMAP, 1, 0, 1, "The chance of adding a prefix to a Star System's name");
StarSufixChance = config.config.getFloat("name_suffix_chance", ConfigurationHandler.CATEGORY_STARMAP, 0.8f, 0, 1, "The chance of adding a suffix to a Star System's name");
minStars = config.config.getInt("min_star_count", ConfigurationHandler.CATEGORY_STARMAP, 2048, 0, 512000, "The minimum amount of stars in a galaxy");
maxStars = config.config.getInt("max_star_count", ConfigurationHandler.CATEGORY_STARMAP, 2048 + 256, 0, 512000, "The maximum amount of stars in a galaxy");
minPlanets = config.config.getInt("min_planet_count", ConfigurationHandler.CATEGORY_STARMAP, 1, 0, 8, "The minimum amount of planets per star system");
maxPlanets = config.config.getInt("max_planet_count", ConfigurationHandler.CATEGORY_STARMAP, 4, 0, 8, "The maximum amount of planets pre star system");
quadrantCount = config.config.getInt("quadrant_count", ConfigurationHandler.CATEGORY_STARMAP, 3, 1, 6, "The amount of quadrants the galaxy should be divided into. The amount is cubed. x ^ 3. For example 3 ^ 3 = 27 quadrants.");
}
//endregion
代码示例来源:origin: Vazkii/Quark
public final void setupBaseConfig(String category) {
if(hasDungeon())
dungeonChance = ModuleLoader.config.getFloat("Dungeon Spawn Chance", category, getDungeonChance(), 0, 1, "The chance that dungeons will spawn any given chunk of the biome. The lower the value, the fewer dungeons will spawn.");
setupConfig(category);
}
代码示例来源:origin: PrinceOfAmber/Cyclic
@Override
public void syncConfig(Configuration config) {
enabled = config.getBoolean("water_candle", Const.ConfigCategory.content, true, Const.ConfigCategory.contentDefaultText);
String category = Const.ConfigCategory.blocks + ".water_candle";
TICK_RATE = config.getInt("tick_speed", category, 50, 1, 9999, "Spawning tick speed");
RADIUS = config.getInt("radius", category, 8, 1, 128, "Spawning radius");
CHANCE_OFF = config.getFloat("chance_off", category, 0.01F, 0.001F, 0.99F, "Chance this will turn itself off after each spawn; 0.01 means 1%. ");
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@Override
public void onConfigChanged(ConfigurationHandler config) {
String category = ConfigurationHandler.CATEGORY_ENTITIES + ".rogue_android";
int spawn_weight = config.config.getInt("spawn_weight", category, 25, 0, 100, "The spawn weight of Androids. This controls how likely are to be chosen to spawn next.");
for (Biome.SpawnListEntry entry : spawnListEntries) {
entry.itemWeight = spawn_weight;
}
loadDimensionBlacklist(config);
loadDimesionWhitelist(config);
loadBiomeBlacklist(config);
loadBiomesWhitelist(config);
EntityRangedRogueAndroidMob.UNLIMITED_WEAPON_ENERGY = config.getBool("unlimited_weapon_energy", category, true, "Do Ranged Rogue Androids have unlimited weapon energy in their weapons");
MAX_ANDROIDS_PER_CHUNK = config.getInt("max_android_per_chunk", category, 4, "The max amount of Rogue Android that can spawn in a given chunk");
SPAWN_CHANCE = config.config.getFloat("spawn_chance_percent", category, 0.1f, 0, 1, "The spawn chance of rogue androids. How likely are they to spawn once chosen to spawn.");
EntityRangedRogueAndroidMob.DROP_NORMAL_WEAPONS = config.getBool("drop_weapons", category, true, "Should normal Rogue Androids drop their weapons? If set to false they will never drop their weapons, but if set to true there is a small chance they will drop them.");
EntityRangedRogueAndroidMob.DROP_LEGENDARY_WEAPONS = config.getBool("drop_legendary_weapons", category, true, "Should Legendary rogue androids drop Legendary weapons");
LEGENDARY_SPAWN_CHANCE = config.config.getFloat("legendary_spawn_chance_percent", category, 0.03f, 0, 1, "The chance in percent, of rogue androids becoming legendary. This is the base value. This value is multiplied by the android's level");
dropItems = config.config.getBoolean("do_drops", category, true, "Should the Rouge Androids drop any items");
}
}
代码示例来源:origin: Glitchfiend/SereneSeasons
protected <T> void addSyncedValue(ISyncedOption option, T defaultValue, String category, String comment, T... args)
{
String value = "";
if (defaultValue instanceof String)
{
value = config.getString(option.getOptionName(), category, defaultValue.toString(), comment);
}
else if (defaultValue instanceof Integer)
{
value = "" + config.getInt(option.getOptionName(), category, (Integer)defaultValue, (Integer)args[0], (Integer)args[1], comment);
}
else if (defaultValue instanceof Boolean)
{
value = "" + config.getBoolean(option.getOptionName(), category, (Boolean)defaultValue, comment);
}
else if (defaultValue instanceof Float)
{
value = "" + config.getFloat(option.getOptionName(), category, (Float)defaultValue, (Float)args[0], (Float)args[1], comment);
}
SyncedConfig.addOption(option, value);
}
代码示例来源:origin: Glitchfiend/ToughAsNails
protected <T> void addSyncedValue(ISyncedOption option, T defaultValue, String category, String comment, T... args)
{
String value = "";
if (defaultValue instanceof String)
{
value = config.getString(option.getOptionName(), category, defaultValue.toString(), comment);
}
else if (defaultValue instanceof Integer)
{
value = "" + config.getInt(option.getOptionName(), category, (Integer)defaultValue, (Integer)args[0], (Integer)args[1], comment);
}
else if (defaultValue instanceof Boolean)
{
value = "" + config.getBoolean(option.getOptionName(), category, (Boolean)defaultValue, comment);
}
else if (defaultValue instanceof Float)
{
value = "" + config.getFloat(option.getOptionName(), category, (Float)defaultValue, (Float)args[0], (Float)args[1], comment);
}
SyncedConfig.addOption(option, value);
}
代码示例来源:origin: McJtyMods/TheOneProbe
public static void setupStyleConfig(Configuration cfg) {
leftX = cfg.getInt("boxLeftX", CATEGORY_CLIENT, leftX, -1, 10000, "The distance to the left side of the screen. Use -1 if you don't want to set this");
rightX = cfg.getInt("boxRightX", CATEGORY_CLIENT, rightX, -1, 10000, "The distance to the right side of the screen. Use -1 if you don't want to set this");
topY = cfg.getInt("boxTopY", CATEGORY_CLIENT, topY, -1, 10000, "The distance to the top side of the screen. Use -1 if you don't want to set this");
bottomY = cfg.getInt("boxBottomY", CATEGORY_CLIENT, bottomY, -1, 10000, "The distance to the bottom side of the screen. Use -1 if you don't want to set this");
boxBorderColor = parseColor(cfg.getString("boxBorderColor", CATEGORY_CLIENT, Integer.toHexString(boxBorderColor), "Color of the border of the box (0 to disable)"));
boxFillColor = parseColor(cfg.getString("boxFillColor", CATEGORY_CLIENT, Integer.toHexString(boxFillColor), "Color of the box (0 to disable)"));
boxThickness = cfg.getInt("boxThickness", CATEGORY_CLIENT, boxThickness, 0, 20, "Thickness of the border of the box (0 to disable)");
boxOffset = cfg.getInt("boxOffset", CATEGORY_CLIENT, boxOffset, 0, 20, "How much the border should be offset (i.e. to create an 'outer' border)");
showLiquids = cfg.getBoolean("showLiquids", CATEGORY_CLIENT, showLiquids, "If true show liquid information when the probe hits liquid first");
isVisible = cfg.getBoolean("isVisible", CATEGORY_CLIENT, isVisible, "Toggle default probe visibility (client can override)");
holdKeyToMakeVisible = cfg.getBoolean("holdKeyToMakeVisible", CATEGORY_CLIENT, holdKeyToMakeVisible, "If true then the probe hotkey must be held down to show the tooltip");
compactEqualStacks = cfg.getBoolean("compactEqualStacks", CATEGORY_CLIENT, compactEqualStacks, "If true equal stacks will be compacted in the chest contents overlay");
tooltipScale = cfg.getFloat("tooltipScale", CATEGORY_CLIENT, tooltipScale, 0.4f, 5.0f, "The scale of the tooltips, 1 is default, 2 is smaller");
chestContentsBorderColor = parseColor(cfg.getString("chestContentsBorderColor", CATEGORY_CLIENT, Integer.toHexString(chestContentsBorderColor), "Color of the border of the chest contents box (0 to disable)"));
showBreakProgress = cfg.getInt("showBreakProgress", CATEGORY_CLIENT, showBreakProgress, 0, 2, "0 means don't show break progress, 1 is show as bar, 2 is show as text");
harvestStyleVanilla = cfg.getBoolean("harvestStyleVanilla", CATEGORY_CLIENT, harvestStyleVanilla, "true means shows harvestability with vanilla style icons");
Map<TextStyleClass, String> newformat = new HashMap<>();
for (TextStyleClass styleClass : textStyleClasses.keySet()) {
String style = cfg.getString("textStyle" + styleClass.getReadableName(),
CATEGORY_CLIENT, textStyleClasses.get(styleClass),
"Text style. Use a comma delimited list with colors like: 'red', 'green', 'blue', ... or style codes like 'underline', 'bold', 'italic', 'strikethrough', ...");
newformat.put(styleClass, style);
}
textStyleClasses = newformat;
extendedInMain = cfg.getBoolean("extendedInMain", CATEGORY_CLIENT, extendedInMain, "If true the probe will automatically show extended information if it is in your main hand (so not required to sneak)");
}
代码示例来源:origin: WesCook/Nutrition
decayMultiplier = configFile.getFloat("DecayMultiplier", CATEGORY_DECAY, 1, -100, 100, "Global value to multiply decay rate by (eg. 0.5 halves the rate, 2.0 doubles it). This can also be set per-nutrient.");
deathPenaltyLoss = configFile.getInt("DeathPenaltyLoss", CATEGORY_DEATH_PENALTY, 15, 0, 100, "The nutrition value subtracted from each nutrient upon death.");
nutritionMultiplier = configFile.getFloat("NutritionMultiplier", CATEGORY_NUTRITION, 1, 0, 100, "Value to multiply base nutrition by for each food (eg. 0.5 to halve nutrition gain).");
startingNutrition = configFile.getInt("StartingNutrition", CATEGORY_NUTRITION, 50, 0, 100, "The starting nutrition level for new players.");
lossPerNutrient = configFile.getInt("LossPerNutrient", CATEGORY_NUTRITION, 15, 0, 100,
代码示例来源:origin: McJtyMods/TheOneProbe
waitingForServerTimeout = cfg.getInt("waitingForServerTimeout", CATEGORY_THEONEPROBE, waitingForServerTimeout, -1, 100000, "The amount of milliseconds to wait before showing a 'fetch from server' info on the client (if the server is slow to respond) (-1 to disable this feature)");
maxPacketToServer = cfg.getInt("maxPacketToServer", CATEGORY_THEONEPROBE, maxPacketToServer, -1, 32768, "The maximum packet size to send an itemstack from client to server. Reduce this if you have issues with network lag caused by TOP");
probeDistance = cfg.getFloat("probeDistance", CATEGORY_THEONEPROBE, probeDistance, 0.1f, 200f, "Distance at which the probe works");
initDefaultConfig(cfg);
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
public static void loadConfig(boolean shouldChange)
{
mirrorEnabled = config.getBoolean("mirror-enabled", CATEGORY_SETTINGS, true, "Determines whether the mirror will be rendered.");
mirrorClouds = config.getBoolean("mirror-clouds", CATEGORY_SETTINGS, false, "Set whether the mirror should render clouds.");
mirrorFov = config.getFloat("mirror-fov", CATEGORY_SETTINGS, 80F, 10F, 100F, "Sets the field of view for the mirror.");
mirrorQuality = config.getInt("mirror-quality", CATEGORY_SETTINGS, 64, 16, 512, "Sets the resolution for the mirror. High number means better quality but worse performace.");
api_debug = config.getBoolean("recipe-api-debug", CATEGORY_SETTINGS, false, "If true, prints out information about RecipeAPI. Recommended 'true' for people trying to add custom recipes.");
canDisplay = config.getBoolean("welcome_message", CATEGORY_SETTINGS, canDisplay, "Enabled or disable the welcome message");
items = config.getStringList("custom-recipes", CATEGORY_API, items, "Insert custom recipes here");
config.addCustomCategoryComment(CATEGORY_RECIPE_SETTINGS, "Enabled or disable the default recipes");
config.addCustomCategoryComment(CATEGORY_API, "RecipeAPI Configuration. How to use: http://mrcrayfishs-furniture-mod.wikia.com/wiki/Configuration");
updateEnabledRecipes();
if(config.hasChanged() && shouldChange)
{
Recipes.clearLocalRecipes();
Recipes.clearCommRecipes();
RecipeRegistry.registerDefaultRecipes();
RecipeRegistry.registerConfigRecipes();
Recipes.addCommRecipesToLocal();
if (Loader.isModLoaded("crafttweaker"))
{
CraftTweakerIntegration.apply();
}
Recipes.updateDataList();
}
config.save();
}
代码示例来源:origin: Glitchfiend/ToughAsNails
timeExtremityMultiplier = config.getFloat("Time Extremity Multiplier", MODIFIER_SETTINGS, 1.25F, 0, Float.MAX_VALUE, "The amount to multiply the temperature increment/decrement by in the middle of the day/night based on how extreme the biome temperature is");
enableDayTimeModifier = config.getBoolean("Enable Day Time Modifier", MODIFIER_SETTINGS, false, "Whether the player's temperature should increase closer to the middle of the day");
enableNightTimeModifier = config.getBoolean("Enable Night Time Modifier", MODIFIER_SETTINGS, true, "Whether the player's temperature should decrease closer to the middle of the night");
内容来源于网络,如有侵权,请联系作者删除!