package portables.common.util; import net.minecraftforge.common.config.Configuration; import portables.common.core.CommonProxy; import portables.common.items.PortableBlock; import portables.common.items.PortableItem; import java.io.File; public class Config { public static void init(File file) { Configuration config = new Configuration(file); try { config.load(); CommonProxy.portableItemID = config.get(Configuration.CATEGORY_GENERAL, "Portable", 15500).getInt(); CommonProxy.portableBlockID = config.get(Configuration.CATEGORY_GENERAL, "Remote Block", 15501).getInt(); CommonProxy.componentsID = config.get(Configuration.CATEGORY_GENERAL, "Crafting Components", 15502).getInt(); CommonProxy.lockID = config.get(Configuration.CATEGORY_GENERAL, "Lock", 15503).getInt(); PortableItem.durability = config.get(Configuration.CATEGORY_GENERAL, "Portable Durability", 300).getInt(); PortableBlock.durability = config.get(Configuration.CATEGORY_GENERAL, "Remote Block Durability", 10).getInt(); } catch (Exception e) { } finally { config.save(); } } }