ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java

38 lines
2.5 KiB
Java
Raw Normal View History

2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.config;
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
import ellpeck.actuallyadditions.config.values.ConfigFloatValues;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import net.minecraftforge.common.config.Configuration;
public class ConfigValues{
public static ConfigCrafting[] craftingConfig = ConfigCrafting.values();
public static ConfigIntValues[] intConfig = ConfigIntValues.values();
public static ConfigFloatValues[] floatConfig = ConfigFloatValues.values();
public static ConfigBoolValues[] boolConfig = ConfigBoolValues.values();
2015-04-19 01:50:02 +02:00
public static String[] crusherRecipeExceptions;
public static String[] mashedFoodCraftingExceptions;
public static void defineConfigValues(Configuration config){
2015-07-01 16:32:21 +02:00
for(ConfigCrafting currConf : craftingConfig){
currConf.currentValue = config.getBoolean(currConf.name, currConf.category, currConf.defaultValue, "If the " + currConf.extraText + "Crafting Recipe for the "+currConf.name+" is Enabled");
2015-03-31 20:37:55 +02:00
}
2015-07-01 16:32:21 +02:00
for(ConfigIntValues currConf : intConfig){
currConf.currentValue = config.getInt(currConf.name, currConf.category, currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
}
2015-07-01 16:32:21 +02:00
for(ConfigFloatValues currConf : floatConfig){
currConf.currentValue = config.getFloat(currConf.name, currConf.category, currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
}
2015-07-01 16:32:21 +02:00
for(ConfigBoolValues currConf : boolConfig){
currConf.currentValue = config.getBoolean(currConf.name, currConf.category, currConf.defaultValue, currConf.desc);
}
2015-07-02 19:03:44 +02:00
crusherRecipeExceptions = config.getStringList("Crusher Recipe Exceptions", ConfigCategories.CRUSHER_RECIPES.name, new String[]{"ingotBrick", "ingotBrickNether"}, "The Ingots, Dusts and Ores blacklisted from being auto-registered to be crushed by the Crusher. This list uses OreDictionary Names of the Inputs only.");
mashedFoodCraftingExceptions = config.getStringList("Mashed Food Crafting Exceptions", ConfigCategories.ITEMS_CRAFTING.name, new String[]{"ActuallyAdditions:itemCoffee"}, "The ItemFood, IGrowable and IPlantable Items that can't be used to craft Mashed Food. These are the actual Item Names, the ones you use, for example, when using the /give Command. Always ModName:ItemName, for example 'Minecraft:stone' or 'ActuallyAdditions:itemHoeObsidian'.");
}
}