package fyresmodjam.misc; import org.lwjgl.input.Keyboard; import net.minecraftforge.common.config.Configuration; public class ConfigData { /* * Starting ID for achievements */ public static int achievementID = 2500; /* * Keybindings */ public static int examineKey = Keyboard.KEY_X; public static int blessingKey = Keyboard.KEY_K; /* * World generation settings */ // Pillars public static int pillarGenChance = 75; public static int maxPillarsPerChunk = 3; public static boolean spawnRandomPillars = true; // Towers public static int towerGenChance = 225; public static boolean spawnTowers = true; // Traps public static int trapGenChance = 300; public static boolean spawnTraps = true; public static boolean trapsBelowGroundOnly = false; // Mushrooms public static int mushroomReplaceChance = 15; /* * Statistic tracking */ public static boolean enableWeaponKillStats = true; public static boolean enableMobKillStats = true; public static boolean enableCraftingStats = true; /* * Blessing/Mark parameters */ public static final double RETALIATION_CHANCE = 0.05; /* * Misc. Toggles */ public static boolean pillarGlow = true; public static boolean disableDisadvantages = false; public static boolean versionChecking = true; public static boolean showAllPillarsInCreative = false; public static void loadFromConfig(Configuration config) { pillarGlow = config .get(Configuration.CATEGORY_GENERAL, "pillar_glow", pillarGlow) .getBoolean(pillarGlow); pillarGenChance = config .get(Configuration.CATEGORY_GENERAL, "pillar_gen_difficulty", pillarGenChance) .getInt(); maxPillarsPerChunk = config.get( Configuration.CATEGORY_GENERAL, "max_pillars_per_chunk", maxPillarsPerChunk).getInt(); towerGenChance = config .get(Configuration.CATEGORY_GENERAL, "tower_gen_difficulty", towerGenChance) .getInt(); trapGenChance = config .get(Configuration.CATEGORY_GENERAL, "trap_gen_difficulty", trapGenChance) .getInt(); mushroomReplaceChance = config.get( Configuration.CATEGORY_GENERAL, "mushroom_replace_difficulty", mushroomReplaceChance).getInt(); spawnTraps = !(config .get(Configuration.CATEGORY_GENERAL, "disable_traps", !spawnTraps) .getBoolean(!spawnTraps)); spawnTowers = config .get(Configuration.CATEGORY_GENERAL, "spawn_towers", spawnTowers) .getBoolean(spawnTowers); spawnRandomPillars = config.get( Configuration.CATEGORY_GENERAL, "spawn_random_pillars", spawnRandomPillars) .getBoolean(spawnRandomPillars); disableDisadvantages = config.get( Configuration.CATEGORY_GENERAL, "disable_disadvantages", disableDisadvantages) .getBoolean(disableDisadvantages); versionChecking = config .get(Configuration.CATEGORY_GENERAL, "version_checking", versionChecking) .getBoolean(versionChecking); showAllPillarsInCreative = config.get( Configuration.CATEGORY_GENERAL, "show_all_pillars_in_creative", showAllPillarsInCreative) .getBoolean(showAllPillarsInCreative); enableMobKillStats = config.get( Configuration.CATEGORY_GENERAL, "enable_mob_kill_stats", enableMobKillStats) .getBoolean(enableMobKillStats); enableWeaponKillStats = config.get( Configuration.CATEGORY_GENERAL, "enable_weapon_kill_stats", enableWeaponKillStats) .getBoolean(enableWeaponKillStats); enableCraftingStats = config.get( Configuration.CATEGORY_GENERAL, "enable_crafting_stats", enableCraftingStats) .getBoolean(enableCraftingStats); trapsBelowGroundOnly = config.get( Configuration.CATEGORY_GENERAL, "traps_below_ground_only", trapsBelowGroundOnly) .getBoolean(trapsBelowGroundOnly); } }