2015-03-07 12:51:28 +01:00
|
|
|
package ellpeck.actuallyadditions.config;
|
2015-02-09 17:25:05 +01:00
|
|
|
|
2015-03-07 12:51:28 +01:00
|
|
|
import ellpeck.actuallyadditions.util.Util;
|
2015-02-09 17:25:05 +01:00
|
|
|
import net.minecraftforge.common.config.Configuration;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
|
|
|
public class ConfigurationHandler{
|
|
|
|
|
|
|
|
public static final String CATEGORY_FOOD_CRAFTING = "food crafting";
|
|
|
|
public static final String CATEGORY_MISC_CRAFTING = "misc crafting";
|
|
|
|
public static final String CATEGORY_BLOCKS_CRAFTING = "block crafting";
|
2015-02-17 16:15:16 +01:00
|
|
|
public static final String CATEGORY_ITEMS_CRAFTING = "items crafting";
|
|
|
|
public static final String CATEGORY_TOOL_VALUES = "tool values";
|
2015-03-07 02:23:31 +01:00
|
|
|
public static final String CATEGORY_MACHINE_VALUES = "machine values";
|
|
|
|
public static final String CATEGORY_MOB_DROPS = "mob drops";
|
2015-02-09 17:25:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
public static void init(File configFile){
|
|
|
|
Util.logInfo("Grabbing Configurations...");
|
|
|
|
Configuration config = new Configuration(configFile);
|
|
|
|
|
|
|
|
try{
|
|
|
|
config.load();
|
|
|
|
ConfigValues.defineConfigValues(config);
|
|
|
|
}
|
|
|
|
catch(Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
finally{
|
|
|
|
config.save();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|