public static void config() { String category = "Device.Tapper"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); String comment = "If TRUE, the Arboreal Extractor will REQUIRE Phyto-Gro to operate."; requireFertilizer = ThermalExpansion.CONFIG.get(category, "RequireFertilizer", requireFertilizer, comment); comment = "Adjust this value to set the number of cycles Phyto-Gro lasts."; boostCycles = ThermalExpansion.CONFIG.getConfiguration().getInt("FertilizerDuration", category, boostCycles, 2, 64, comment); }
private static List<IConfigElement> getClientConfigElements() { List<IConfigElement> list = new ArrayList<>(); for (String category : CATEGORIES_CLIENT) { list.add(new ConfigElement(ThermalExpansion.CONFIG_CLIENT.getCategory(category))); } return list; }
private static void config() { CONFIG_FLORBS.setConfiguration(new Configuration(new File(CoreProps.configDir, "cofh/" + ThermalExpansion.MOD_ID + "/florbs.cfg"), true)); String category = "General"; String comment = "If TRUE, the recipes for Florbs are enabled. Setting this to FALSE means that you actively dislike fun things."; enable = CONFIG_FLORBS.getConfiguration().getBoolean("EnableRecipe", category, enable, comment); category = "Blacklist"; comment = "List of fluids that are not allowed to be placed in Florbs."; blacklist = CONFIG_FLORBS.getConfiguration().getStringList("Blacklist", category, blacklist, comment); }
public void config() { String category = "Block.OreFluid"; String comment = "If TRUE, Clathrates will create fluid when broken."; enableBreakFluid = ThermalFoundation.CONFIG.get(category, "FluidOnBreaking", enableBreakFluid, comment); }
public static void config() { String category = "Fluid.Mana"; String comment; comment = "If TRUE, Fluid Mana will do...things."; effect = ThermalFoundation.CONFIG.getConfiguration().getBoolean("Effect", category, effect, comment); comment = "If TRUE, Fluid Mana Source blocks will gradually fall downwards."; enableSourceFall = ThermalFoundation.CONFIG.getConfiguration().getBoolean("Fall", category, enableSourceFall, comment); }
enableSecurity = ThermalExpansion.CONFIG.get(category, "Securable", enableSecurity, comment); enableUpgrades = ThermalExpansion.CONFIG.get(category, "Upgradable", enableUpgrades, comment); enableClassicRecipes = ThermalExpansion.CONFIG.get(category, "ClassicCrafting", enableClassicRecipes, comment); enableUpgradeKitCrafting = ThermalExpansion.CONFIG.get(category, "UpgradeKitCrafting", enableUpgradeKitCrafting, comment); customAugmentScaling = ThermalExpansion.CONFIG.get(category, "CustomAugmentScaling", customAugmentScaling, comment); customPowerScaling = ThermalExpansion.CONFIG.get(category, "CustomPowerScaling", customPowerScaling, comment); smallStorage = ThermalExpansion.CONFIG.get(category, "SmallStorage", smallStorage, comment); ThermalExpansion.CONFIG.getCategory(category).setComment(comment); validScaling = true; customAugments[i] = (byte) ThermalExpansion.CONFIG.getConfiguration().getInt("Level" + i, category, customAugments[i], CoreProps.AUGMENT_MIN, CoreProps.AUGMENT_MAX, "Augment Slots for Level " + i + " Dynamos."); ThermalExpansion.CONFIG.getCategory(category).setComment(comment); validScaling = true; customPowerScale[i] = ThermalExpansion.CONFIG.getConfiguration().getInt("Level" + i, category, customPowerScale[i], POWER_BASE, POWER_BASE * ((i + 1) * (i + 1)), "Scale Factor for Level " + i + " Dynamos.");
private static void configClient() { String category; String comment; /* GLOBAL */ category = "Global"; CoFHCore.CONFIG_CLIENT.getCategory(category).setComment("The options in this section change core Minecraft behavior and are not limited to CoFH mods."); comment = "If TRUE, particles will be disabled."; disableParticles = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("DisableParticles", category, disableParticles, comment); /* GRAPHICS */ category = "Render"; comment = "If TRUE, Color Blind Textures will be enabled in CoFH Mods, where applicable."; enableColorBlindTextures = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("EnableColorBlindTextures", category, enableColorBlindTextures, comment); comment = "If TRUE, the standard Enchant Effects will be shown for enchanted items in CoFH Mods, where applicable."; enableEnchantEffects = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("EnableEnchantEffects", category, enableEnchantEffects, comment); comment = "If TRUE, borders will be drawn on GUI slots in CoFH Mods, where applicable."; enableGUISlotBorders = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("EnableGUISlotBorders", category, enableGUISlotBorders, comment); comment = "If TRUE, Shader Effects will be enabled in CoFH Mods, where applicable."; enableShaderEffects = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("EnableShaderEffects", category, enableShaderEffects, comment); /* INTERFACE */ category = "Interface"; comment = "If TRUE, a tooltip will be used which prompts to press Shift for more details on various items."; StringHelper.displayShiftForDetail = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("DisplayHoldShiftForDetail", category, StringHelper.displayShiftForDetail, comment); comment = "If TRUE, large item counts will be displayed as stacks rather than a single quantity."; StringHelper.displayStackCount = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("DisplayContainedItemsAsStackCount", category, StringHelper.displayStackCount, comment); /* SECURITY */ category = "Security"; comment = "If TRUE, a warning will display if Ops have access to \"secure\" blocks upon logging on to a server."; enableOpSecureAccessWarning = CoFHCore.CONFIG_CLIENT.getConfiguration().getBoolean("OpsCanAccessSecureBlocksWarning", category, enableOpSecureAccessWarning, comment); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { CONFIG.setConfiguration(new Configuration(new File(CoreProps.configDir, "/cofh/" + MOD_ID + "/common.cfg"), true)); CONFIG_CLIENT.setConfiguration(new Configuration(new File(CoreProps.configDir, "/cofh/" + MOD_ID + "/client.cfg"), true)); RAProps.preInit(); RABlocks.preInit(); RAItems.preInit(); RAEquipment.preInit(); CoreEnchantments.register(); proxy.preInit(event); }
public boolean renameCategory(String category, String newCategory) { if (!modConfiguration.hasCategory(category)) { return false; } modConfiguration.getCategory(category); for (Property prop : modConfiguration.getCategory(category).values()) { copyProperty(category, prop.getName(), newCategory, prop.getName(), true); } removeCategory(category); return true; }
public static void config() { String category = "Device.WaterGen"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); String comment = "If TRUE, the Aqueous Accumulator will act as an Infinite Source and will also function in the Nether."; infiniteSource = ThermalExpansion.CONFIG.get(category, "Infinite", infiniteSource, comment); comment = "If TRUE, the Aqueous Accumulator will produce water very slowly even without adjacent source blocks."; passiveGen = ThermalExpansion.CONFIG.get(category, "PassiveGeneration", passiveGen, comment); // comment = "If TRUE, the Aqueous Accumulator will only function in Rivers and Oceans."; // biomeRestriction = ThermalExpansion.CONFIG.get(category, "BiomeRestriction", biomeRestriction, comment); }
public static void config() { String category = "Fluid.CrudeOil"; String comment = "If TRUE, Crude Oil will be flammable."; effect = ThermalFoundation.CONFIG.getConfiguration().getBoolean("Flammable", category, effect, comment); }
enableSecurity = ThermalExpansion.CONFIG.get(category, "Securable", true, comment); enableUpgrades = ThermalExpansion.CONFIG.get(category, "Upgradable", enableUpgrades, comment); BlockMachine.enableClassicRecipes = ThermalExpansion.CONFIG.get(category, "ClassicCrafting", BlockMachine.enableClassicRecipes, comment); BlockMachine.enableUpgradeKitCrafting = ThermalExpansion.CONFIG.get(category, "UpgradeKitCrafting", BlockMachine.enableUpgradeKitCrafting, comment); customAugmentScaling = ThermalExpansion.CONFIG.get(category, "CustomAugmentScaling", customAugmentScaling, comment); customPowerScaling = ThermalExpansion.CONFIG.get(category, "CustomPowerScaling", customPowerScaling, comment); customEnergyScaling = ThermalExpansion.CONFIG.get(category, "CustomEnergyScaling", customEnergyScaling, comment); disableAutoInput = ThermalExpansion.CONFIG.get(category, "DisableAutoInput", disableAutoInput, comment); disableAutoOutput = ThermalExpansion.CONFIG.get(category, "DisableAutoOutput", disableAutoOutput, comment); smallStorage = ThermalExpansion.CONFIG.get(category, "SmallStorage", smallStorage, comment); ThermalExpansion.CONFIG.getCategory(category).setComment(comment); validScaling = true; customAugments[i] = (byte) ThermalExpansion.CONFIG.getConfiguration().getInt("Level" + i, category, customAugments[i], CoreProps.AUGMENT_MIN, CoreProps.AUGMENT_MAX, "Augment Slots for Level " + i + " Machines."); ThermalExpansion.CONFIG.getCategory(category).setComment(comment); validScaling = true; customPowerScale[i] = ThermalExpansion.CONFIG.getConfiguration().getInt("Level" + i, category, customPowerScale[i], POWER_BASE, POWER_BASE * ((i + 1) * (i + 1)), "Scale Factor for Level " + i + " Machines.");
private static void config() { CONFIG_MORBS.setConfiguration(new Configuration(new File(CoreProps.configDir, "cofh/" + ThermalExpansion.MOD_ID + "/morbs.cfg"), true)); String category = "General"; String comment = "If TRUE, the recipes for Morbs are enabled. Setting this to FALSE means that you actively dislike fun things and/or Pokemon tributes."; enable = CONFIG_MORBS.getConfiguration().getBoolean("EnableRecipe", category, enable, comment); category = "Blacklist"; comment = "List of entities that are not allowed to be placed in Morbs. Mobs without spawn eggs are automatically disallowed."; blacklist = CONFIG_MORBS.getConfiguration().getStringList("Blacklist", category, blacklist, comment); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { CONFIG.setConfiguration(new Configuration(new File(CoreProps.configDir, "/cofh/thermaldynamics/common.cfg"), true)); CONFIG_CLIENT.setConfiguration(new Configuration(new File(CoreProps.configDir, "cofh/thermaldynamics/client.cfg"), true)); CoverHelper.loadCoverBlacklist(new File(CoreProps.configDir, "cofh/thermaldynamics")); TDProps.preInit(); TDBlocks.preInit(); TDItems.preInit(); TDSounds.preInit(); /* Register Handlers */ registerHandlers(); proxy.preInit(event); }
public static void config() { String category = "Device.Fisher"; BlockDevice.enable[TYPE] = ThermalExpansion.CONFIG.get(category, "Enable", true); String comment = "If TRUE, the Aquatic Entangler will REQUIRE Aqua-Chow to operate."; requireBait = ThermalExpansion.CONFIG.get(category, "RequireBait", requireBait, comment); comment = "Adjust this value to set the number of cycles Aqua-Chow lasts."; boostCycles = ThermalExpansion.CONFIG.getConfiguration().getInt("BaitDuration", category, boostCycles, 2, 64, comment); }
public static void config() { String category = "Device"; String comment = "If TRUE, Devices are securable."; enableSecurity = ThermalExpansion.CONFIG.get(category, "Securable", true, comment); comment = "If TRUE, most Devices will no longer have Auto-Input functionality. Not recommended, but knock yourself out."; disableAutoInput = ThermalExpansion.CONFIG.get(category, "DisableAutoInput", disableAutoInput, comment); comment = "If TRUE, most Devices will no longer have Auto-Output functionality. Not recommended, but knock yourself out."; disableAutoOutput = ThermalExpansion.CONFIG.get(category, "DisableAutoOutput", disableAutoOutput, comment); }
public static void config() { String category = "Fluid.Pyrotheum"; String comment; comment = "If TRUE, Fluid Pyrotheum will be worse than lava."; effect = ThermalFoundation.CONFIG.getConfiguration().getBoolean("Effect", category, effect, comment); comment = "If TRUE, Fluid Pyrotheum Source blocks will gradually fall downwards."; enableSourceFall = ThermalFoundation.CONFIG.getConfiguration().getBoolean("Fall", category, enableSourceFall, comment); }
private static List<IConfigElement> getCommonConfigElements() { List<IConfigElement> list = new ArrayList<>(); for (String category : CATEGORIES_COMMON) { list.add(new ConfigElement(ThermalExpansion.CONFIG.getCategory(category))); } return list; }