2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.config ;
2015-02-09 17:25:05 +01:00
2015-04-24 19:22:03 +02:00
import ellpeck.actuallyadditions.config.values.ConfigBoolValues ;
import ellpeck.actuallyadditions.config.values.ConfigCrafting ;
import ellpeck.actuallyadditions.config.values.ConfigFloatValues ;
import ellpeck.actuallyadditions.config.values.ConfigIntValues ;
2015-02-09 17:25:05 +01:00
import net.minecraftforge.common.config.Configuration ;
public class ConfigValues {
2015-04-24 19:22:03 +02:00
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
2015-07-02 11:44:41 +02:00
public static String [ ] crusherRecipeExceptions ;
2015-02-09 17:25:05 +01:00
public static void defineConfigValues ( Configuration config ) {
2015-07-01 16:32:21 +02:00
for ( ConfigCrafting currConf : craftingConfig ) {
2015-07-02 11:44:41 +02:00
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-04-24 19:22:03 +02:00
}
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-04-24 19:22:03 +02:00
}
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-04-24 19:22:03 +02:00
}
2015-07-02 11:44:41 +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 by the Crusher. This list uses OreDictionary Names of the Inputs only. " ) ;
2015-02-09 17:25:05 +01:00
}
}