diff options
Diffstat (limited to 'src/main/java/bartworks/common')
18 files changed, 297 insertions, 426 deletions
diff --git a/src/main/java/bartworks/common/commands/ChangeConfig.java b/src/main/java/bartworks/common/commands/ChangeConfig.java deleted file mode 100644 index 8e7edc765f..0000000000 --- a/src/main/java/bartworks/common/commands/ChangeConfig.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following - * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial - * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -package bartworks.common.commands; - -import java.lang.reflect.Field; - -import net.minecraft.command.CommandBase; -import net.minecraft.command.ICommandSender; -import net.minecraft.util.ChatComponentText; - -import bartworks.common.configs.ConfigHandler; - -public class ChangeConfig extends CommandBase { - - @Override - public String getCommandName() { - return "bwcfg"; - } - - @Override - public String getCommandUsage(ICommandSender sender) { - return "bwcfg <NameOfVariable> <newValue>"; - } - - @Override - @SuppressWarnings("rawtypes") - public void processCommand(ICommandSender sender, String[] args) { - try { - Field f = ConfigHandler.class.getField(args[0]); - Class c = f.getType(); - if (c.equals(int.class)) { - int l; - try { - l = Integer.parseInt(args[1]); - } catch (NumberFormatException e) { - sender.addChatMessage(new ChatComponentText("you need to enter a number!")); - return; - } - f.setInt(null, l); - } else if (c.equals(long.class)) { - long l; - try { - l = Long.parseLong(args[1]); - } catch (NumberFormatException e) { - sender.addChatMessage(new ChatComponentText("you need to enter a number!")); - return; - } - f.setLong(null, l); - } else if (c.equals(boolean.class)) { - if ("true".equalsIgnoreCase(args[1]) || "1".equalsIgnoreCase(args[1])) f.setBoolean(null, true); - else if ("false".equalsIgnoreCase(args[1]) || "0".equalsIgnoreCase(args[1])) f.setBoolean(null, false); - else { - sender.addChatMessage(new ChatComponentText("booleans need to be set to true or false")); - } - } - sender.addChatMessage(new ChatComponentText("Set " + args[0] + " to " + args[1])); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/src/main/java/bartworks/common/configs/ConfigHandler.java b/src/main/java/bartworks/common/configs/ConfigHandler.java deleted file mode 100644 index e378819ad1..0000000000 --- a/src/main/java/bartworks/common/configs/ConfigHandler.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (c) 2018-2020 bartimaeusnek Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following - * conditions: The above copyright notice and this permission notice shall be included in all copies or substantial - * portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -package bartworks.common.configs; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; - -import net.minecraftforge.common.config.Configuration; - -import bartworks.API.APIConfigValues; - -public class ConfigHandler { - - public static Configuration c; - - public static int megaMachinesMax = 256; - public static int mbWaterperSec = 150; - public static int ross128BID = -64; - public static int ross128BAID = -63; - public static int ross128btier = 3; - public static int ross128batier = 3; - public static int landerType = 3; - public static int ross128bRuinChance = 512; - public static int bioVatMaxParallelBonus = 1000; - public static int cutoffTier = 5; - public static int[][][] metasForTiers; - - public static long energyPerCell = 1000000L; - - public static boolean Ross128Enabled = true; - - public static boolean disableExtraGassesForEBF; - public static boolean disableMagicalForest; - public static boolean DEHPDirectSteam; - public static boolean teslastaff; - public static boolean classicMode; - - public static boolean GTppLogDisabler; - public static boolean tooltips = true; - public static boolean sharedItemStackTooltip = true; - public static boolean[] enabledPatches; - - public static byte maxTierRoss; - - public static boolean disableBoltedBlocksCasing = false; - public static boolean disableReboltedBlocksCasing = false; - - public static int pollutionHeatedWaterPumpSecond = 5; - public static int basePollutionMBFSecond = 400; - - public static Set<String> voidMinerBlacklist = Collections.unmodifiableSet(new HashSet<>()); - - public static boolean disablePistonInEIC = false; - - private static final int[][] METAFORTIERS_ENERGY = { { 100, 101, 102, 105 }, { 1110, 1115, 1120, 1127 }, - { 1111, 12726, 1116, 1121, 1128 }, { 1112, 12727, 1117, 1122, 1129 }, { 12728, 1190, 1130, 12685 }, - { 1191, 1174, 695, 12686 }, }; - private static final int[][] METAFORTIERS_BUFFER = { { 5133, 5123 }, { 161, 171, 181, 191 }, { 162, 172, 182, 192 }, - { 163, 173, 183, 193 }, { 164, 174, 184, 194 }, { 165, 175, 185, 195 }, }; - private static final int[][] METAFORTIERS_CABLE = { { 5133, 5123 }, { 1210, 1230, 1250, 1270, 1290 }, - { 1310, 1330, 1350, 1370, 1390 }, { 1410, 1430, 1450, 1470, 1490 }, { 1510, 1530, 1550, 1570, 1590 }, - { 1650, 1670, 1690 }, }; - private static final int[][] METAFORTIERS_MACHINE = { - { 103, 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119 }, - { 201, 211, 221, 231, 241, 251, 261, 271, 281, 291, 301, 311, 321, 331, 341, 351, 361, 371, 381, 391, 401, 411, - 421, 431, 441, 451, 461, 471, 481, 491, 501, 511, 521, 531, 541, 551, 561, 571, 581, 591, 601, 611, 621, - 631, 641, 651, 661, 671 }, - { 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 302, 312, 322, 332, 342, 352, 362, 372, 382, 392, 402, 412, - 422, 432, 442, 452, 462, 472, 482, 492, 502, 512, 522, 532, 542, 552, 562, 572, 582, 592, 602, 612, 622, - 632, 642, 652, 662, 672 }, - { 203, 213, 223, 233, 243, 253, 263, 273, 283, 293, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 403, 413, - 423, 433, 443, 453, 463, 473, 483, 493, 503, 513, 523, 533, 543, 553, 563, 573, 583, 593, 603, 613, 623, - 633, 643, 653, 663, 673 }, - { 204, 214, 224, 234, 244, 254, 264, 274, 284, 294, 304, 314, 324, 334, 344, 354, 364, 374, 384, 394, 404, 414, - 424, 434, 444, 454, 464, 474, 484, 494, 504, 514, 524, 534, 544, 554, 564, 574, 584, 594, 604, 614, 624, - 634, 644, 654, 664, 674 }, - { 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405, 415, - 425, 435, 445, 455, 465, 475, 485, 495, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595, 605, 615, 625, - 635, 645, 655, 665, 675 }, }; - private static int[][][] defaultMetasForTiers = { METAFORTIERS_ENERGY, METAFORTIERS_BUFFER, METAFORTIERS_CABLE, - METAFORTIERS_MACHINE }; - private static final String[] VOLTAGE_NAMES = { "High Pressure Steam", "Low Voltage", "Medium Voltage", - "High Voltage", "Extreme Voltage", "Insane Voltage", "Ludicrous Voltage", "ZPM Voltage", "Ultimate Voltage", - "Ultimate High Voltage", "Ultimate Extreme Voltage", "Ultimate Insane Voltage", "Ultimate Mega Voltage", - "Ultimate Extended Mega Voltage", "Overpowered Voltage", "Maximum Voltage" }; - private static final String[] names = { "Generators", "Buffers", "Cables", "Machines" }; - - public static final String[] ASM_TRANSFORMER_DESCRIPTIONS = { "REMOVING RAIN FROM LAST MILLENNIUM (EXU)", - "REMOVING CREATURES FROM LAST MILLENNIUM (EXU)", "PATCHING THAUMCRAFT WAND PEDESTAL TO PREVENT VIS DUPLICATION", - "PATCHING CRAFTING MANAGER FOR CACHING RECIPES" }; - public static final String[] ASM_TRANSFORMER_CLASSES = { - "com.rwtema.extrautils.worldgen.endoftime.WorldProviderEndOfTime", - "com.rwtema.extrautils.worldgen.endoftime.ChunkProviderEndOfTime", "thaumcraft.common.tiles.TileWandPedestal", - "net.minecraft.item.crafting.CraftingManager" }; - - public ConfigHandler(Configuration C) { - ConfigHandler.c = C; - ConfigHandler.classicMode = ConfigHandler.c - .get( - "System", - "Enable Classic Mode", - false, - "Enables the classic Mode (all recipes in normal machines are doable in MV") - .getBoolean(false); - - ConfigHandler.tooltips = ConfigHandler.c - .get("System", "BartWorksToolTips", true, "If you wish to enable extra tooltips") - .getBoolean(true); - ConfigHandler.sharedItemStackTooltip = ConfigHandler.c - .get( - "System", - "BartWorksSharedItemStackToolTips", - true, - "If you wish to enable \"Shared Item Stack\" tooltips") - .getBoolean(true); - - ConfigHandler.teslastaff = ConfigHandler.c - .get( - "System", - "Enable Teslastaff", - false, - "Enables the Teslastaff, an Item used to destroy Electric Armors") - .getBoolean(false); - - ConfigHandler.cutoffTier = ConfigHandler.c - .get( - "System", - "Tier to nerf circuits", - 5, - "This switch sets the lowest unnerfed Circuit Recipe Tier. -1 to disable it completely.", - -1, - VOLTAGE_NAMES.length) - .getInt(5); - ConfigHandler.cutoffTier = ConfigHandler.cutoffTier == -1 ? VOLTAGE_NAMES.length : ConfigHandler.cutoffTier; - ConfigHandler.disableExtraGassesForEBF = ConfigHandler.c - .get( - "System", - "Disable Extra Gases for EBF", - false, - "This switch disables extra gas recipes for the EBF, i.e. Xenon instead of Nitrogen") - .getBoolean(false); - ConfigHandler.disableBoltedBlocksCasing = ConfigHandler.c - .get("System", "Disable Bolted Casings", false, "This switch disable the generation of bolted casings") - .getBoolean(false); - ConfigHandler.disableReboltedBlocksCasing = ConfigHandler.c - .get("System", "Disable Rebolted Casings", false, "This switch disable the generation of rebolted casings") - .getBoolean(false); - - ConfigHandler.mbWaterperSec = ConfigHandler.c.get("Singleblocks", "mL Water per Sec for the StirlingPump", 150) - .getInt(150); - - ConfigHandler.energyPerCell = ConfigHandler.c - .get( - "Multiblocks", - "energyPerLESUCell", - 1000000, - "This will set Up the Energy per LESU Cell", - 1000000, - Integer.MAX_VALUE) - .getInt(1000000); - ConfigHandler.DEHPDirectSteam = ConfigHandler.c.get( - "Multiblocks", - "DEHP Direct Steam Mode", - false, - "This switch enables the Direct Steam Mode of the DEHP. If enabled it will take in Waterand output steam. If disabled it will Input IC2Coolant and output hot coolant") - .getBoolean(false); - ConfigHandler.megaMachinesMax = ConfigHandler.c - .get( - "Multiblocks", - "Mega Machines Maximum Recipes per Operation", - 256, - "This changes the Maximum Recipes per Operation to the specified Valure") - .getInt(256); - ConfigHandler.bioVatMaxParallelBonus = ConfigHandler.c - .get( - "Multiblocks", - "BioVat Maximum Bonus on Recipes", - 1000, - "This are the maximum parallel Operations the BioVat can do, when the output is half full.") - .getInt(1000); - ConfigHandler.voidMinerBlacklist = Collections.unmodifiableSet( - new HashSet<>( - Arrays.asList( - ConfigHandler.c.get( - "Multiblocks", - "Void Miner Blacklist", - new String[0], - "This is a blacklist for the Void Miner, blacklisted ores will not enter the drop prize pool. Please fill in the Unique Identifier of Ore and connect Damage with a colon, For example: gregtech:gt.blockores:32") - .getStringList()))); - ConfigHandler.disablePistonInEIC = ConfigHandler.c - .get( - "Multiblocks", - "Disable Electric Implosion Compressor piston", - false, - "This switch completely disables piston animation in Electric Implosion Compressor multiblock") - .getBoolean(false); - - ConfigHandler.pollutionHeatedWaterPumpSecond = ConfigHandler.c - .get( - "Pollution", - "Pollution produced per second by the water pump", - ConfigHandler.pollutionHeatedWaterPumpSecond, - "How much should the Simple Stirling Water Pump produce pollution per second") - .getInt(ConfigHandler.pollutionHeatedWaterPumpSecond); - ConfigHandler.basePollutionMBFSecond = ConfigHandler.c.get( - "Pollution", - "Pollution produced per tick by the MBF per ingot", - ConfigHandler.basePollutionMBFSecond, - "How much should the MBF produce pollution per tick per ingot. Then it'll be multiplied by the amount of ingots done in parallel") - .getInt(ConfigHandler.basePollutionMBFSecond); - - ConfigHandler.GTppLogDisabler = ConfigHandler.c - .get("System", "Disable GT++ Logging", false, "Enables or Disables GT++ Logging.") - .getBoolean(false); - APIConfigValues.debugLog = ConfigHandler.c - .get("System", "Enable Debug Log", false, "Enables or Disables the debug log.") - .getBoolean(false); - - ConfigHandler.enabledPatches = new boolean[ASM_TRANSFORMER_CLASSES.length]; - for (int i = 0; i < ASM_TRANSFORMER_CLASSES.length; i++) ConfigHandler.enabledPatches[i] = ConfigHandler.c - .get("ASM fixes", ASM_TRANSFORMER_DESCRIPTIONS[i] + " in class: " + ASM_TRANSFORMER_CLASSES[i], true) - .getBoolean(true); - - ConfigHandler.ross128BID = ConfigHandler.c - .get("CrossMod Interactions", "DimID - Ross128b", -64, "The Dim ID for Ross128b") - .getInt(-64); - ConfigHandler.ross128BAID = ConfigHandler.c - .get("CrossMod Interactions", "DimID - Ross128ba", -63, "The Dim ID for Ross128ba (Ross128b's Moon)") - .getInt(-63); - ConfigHandler.ross128btier = ConfigHandler.c - .get("CrossMod Interactions", "Rocket Tier - Ross128b", 3, "The Rocket Tier for Ross128b") - .getInt(3); - ConfigHandler.ross128batier = ConfigHandler.c - .get("CrossMod Interactions", "Rocket Tier - Ross128ba", 3, "The Rocket Tier for Ross128a") - .getInt(3); - ConfigHandler.ross128bRuinChance = ConfigHandler.c - .get("CrossMod Interactions", "Ruin Chance - Ross128b", 512, "Higher Values mean lesser Ruins.") - .getInt(512); - ConfigHandler.Ross128Enabled = ConfigHandler.c - .get( - "CrossMod Interactions", - "Galacticraft - Activate Ross128 System", - true, - "If the Ross128 System should be activated, DO NOT CHANGE AFTER WORLD GENERATION") - .getBoolean(true); - ConfigHandler.landerType = ConfigHandler.c - .get("CrossMod Interactions", "LanderType", 3, "1 = Moon Lander, 2 = Landing Balloons, 3 = Asteroid Lander") - .getInt(3); - ConfigHandler.disableMagicalForest = ConfigHandler.c - .get( - "CrossMod Interactions", - "Disable Magical Forest - Ross128b", - false, - "True disables the magical Forest Biome on Ross for more performance during World generation.") - .getBoolean(false); - - ConfigHandler.maxTierRoss = (byte) ConfigHandler.c - .get("Ross Ruin Metas", "A_Ruin Machine Tiers", 6, "", 0, VOLTAGE_NAMES.length) - .getInt(6); - ConfigHandler.metasForTiers = new int[4][maxTierRoss][]; - - for (int i = 0; i < 4; i++) { - if (maxTierRoss > ConfigHandler.defaultMetasForTiers[i].length) - ConfigHandler.defaultMetasForTiers[i] = new int[maxTierRoss][0]; - for (int j = 0; j < maxTierRoss; j++) ConfigHandler.metasForTiers[i][j] = ConfigHandler.c - .get( - "Ross Ruin Metas", - j + "_Ruin " + names[i] + " Tier " + VOLTAGE_NAMES[j], - ConfigHandler.defaultMetasForTiers[i][j]) - .getIntList(); - } - - ConfigHandler.setUpComments(); - - if (ConfigHandler.c.hasChanged()) ConfigHandler.c.save(); - } - - private static void setUpComments() { - ConfigHandler.c.addCustomCategoryComment("ASM fixes", "Disable ASM fixes here."); - ConfigHandler.c.addCustomCategoryComment("Singleblocks", "Singleblock Options can be set here."); - ConfigHandler.c.addCustomCategoryComment("Multiblocks", "Multiblock Options can be set here."); - ConfigHandler.c.addCustomCategoryComment("System", "Different System Settings can be set here."); - ConfigHandler.c.addCustomCategoryComment( - "CrossMod Interactions", - "CrossMod Interaction Settings can be set here. For Underground Fluid settings change the Gregtech.cfg!"); - ConfigHandler.c.addCustomCategoryComment("Ross Ruin Metas", "Ruin Metas and Tiers can be set here."); - } -} diff --git a/src/main/java/bartworks/common/configs/Configuration.java b/src/main/java/bartworks/common/configs/Configuration.java new file mode 100644 index 0000000000..813c825dce --- /dev/null +++ b/src/main/java/bartworks/common/configs/Configuration.java @@ -0,0 +1,245 @@ +package bartworks.common.configs; + +import com.gtnewhorizon.gtnhlib.config.Config; + +import gregtech.api.enums.Mods; + +@Config(modid = Mods.Names.BART_WORKS, filename = "bartworks") +@Config.LangKeyPattern(pattern = "GT5U.gui.config.%cat.%field", fullyQualified = true) +@Config.RequiresMcRestart +public class Configuration { + + public static final Mixins mixins = new Mixins(); + + public static final CrossModInteractions crossModInteractions = new CrossModInteractions(); + + public static final Multiblocks multiblocks = new Multiblocks(); + + public static final Tooltip tooltip = new Tooltip(); + + public static final SingleBlocks singleBlocks = new SingleBlocks(); + + public static final Pollution pollution = new Pollution(); + + public static final RossRuinMetas rossRuinMetas = new RossRuinMetas(); + + @Config.Comment("Mixins section.") + public static class Mixins { + + @Config.Comment("if true, patches the crafting manager to cache recipes in class: net.minecraft.item.crafting.CraftingManager") + @Config.DefaultBoolean(false) + public boolean enableCraftingManagerRecipeCaching = false; + } + + @Config.Comment("Crossmod interactions section.") + public static class CrossModInteractions { + + @Config.Comment("The Dim ID for Ross128b") + @Config.DefaultInt(64) + public int ross128BID; + + @Config.Comment("The Dim ID for Ross128ba (Ross128b's Moon)") + @Config.DefaultInt(63) + public int ross128BAID; + + @Config.Ignore() + public static int ross128btier = 3; + + @Config.Ignore() + public static int ross128batier = 5; + + @Config.Comment("Higher Values mean lesser Ruins.") + @Config.DefaultInt(512) + public int ross128bRuinChance; + + @Config.Comment("If the Ross128 System should be activated, DO NOT CHANGE AFTER WORLD GENERATION") + @Config.DefaultBoolean(true) + public boolean Ross128Enabled; + + @Config.Comment("1 = Moon Lander, 2 = Landing Balloons, 3 = Asteroid Lander") + @Config.DefaultEnum("AsteroidsLander") + public LanderType landerType; + + @Config.Comment("True disables the magical Forest Biome on Ross for more performance during World generation.") + @Config.DefaultBoolean(false) + public boolean disableMagicalForest; + } + + @Config.Comment("Multiblocks section.") + public static class Multiblocks { + + @Config.Comment("This will set Up the Energy per LESU Cell") + @Config.DefaultInt(20_000_000) + public int energyPerCell; + + @Config.Comment("This switch enables the Direct Steam Mode of the DEHP. If enabled it will take in Waterand output steam. If disabled it will Input IC2Coolant and output hot coolant") + @Config.DefaultBoolean(false) + public boolean DEHPDirectSteam; + + @Config.Ignore() + public static int megaMachinesMax = 256; + + @Config.Ignore() + public static int bioVatMaxParallelBonus = 1_000; + + @Config.Comment({ + "This is a blacklist for the Void Miner, blacklisted ores will not enter the drop prize pool.", + "Please fill in the Unique Identifier of Ore and connect Damage with a colon,", + "For example: gregtech:gt.blockores:32" }) + @Config.DefaultStringList({}) + public String[] voidMinerBlacklist; + + @Config.Comment("This switch completely disables piston animation in Electric Implosion Compressor multiblock") + @Config.DefaultBoolean(false) + public boolean disablePistonInEIC; + } + + @Config.Comment("Tooltip section.") + public static class Tooltip { + + @Config.Comment("If true, add glass tier in tooltips.") + @Config.DefaultBoolean(true) + public boolean addGlassTierInTooltips; + } + + @Config.Comment("Single blocks section.") + public static class SingleBlocks { + + @Config.Comment("mL Water per Sec for the StirlingPump") + @Config.DefaultInt(150) + public int mbWaterperSec; + } + + @Config.Comment("Pollution section.") + public static class Pollution { + + @Config.Comment("How much should the Simple Stirling Water Pump produce pollution per second") + @Config.DefaultInt(5) + public int pollutionHeatedWaterPumpSecond; + + @Config.Comment("How much should the MBF produce pollution per tick per ingot. Then it'll be multiplied by the amount of ingots done in parallel") + @Config.DefaultInt(400) + public int basePollutionMBFSecond; + } + + @Config.Comment("Ross' ruins machine metaIDs section.") + public static class RossRuinMetas { + + @Config.Ignore() + public static final byte maxTierRoss = 5; + + public HighPressureSteam highPressureSteam = new HighPressureSteam(); + public LV lv = new LV(); + public MV mv = new MV(); + public HV hv = new HV(); + public EV ev = new EV(); + + @Config.Comment("Possible machines for high pressure steam ruins.") + public static class HighPressureSteam { + + @Config.Comment("MetaIDs of the GT machines for the buffer slots") + @Config.DefaultIntList({ 5133, 5123 }) + public int[] buffers; + + @Config.Comment("MetaIDs of the GT machines for the cable slots") + @Config.DefaultIntList({ 5133, 5123 }) + public int[] cables; + + @Config.Comment("MetaIDs of the GT machines for the generator slots") + @Config.DefaultIntList({ 100, 101, 102, 105 }) + public int[] generators; + + @Config.Comment("MetaIDs of the GT machines for the machine slots") + @Config.DefaultIntList({ 103, 104, 106, 107, 109, 110, 112, 113, 115, 116, 118, 119 }) + public int[] machines; + } + + @Config.Comment("Possible machines for LV ruins.") + public static class LV { + + @Config.Comment("MetaIDs of the GT machines for the buffer slots") + @Config.DefaultIntList({ 161, 171, 181, 191 }) + public int[] buffers; + + @Config.Comment("MetaIDs of the GT machines for the cable slots") + @Config.DefaultIntList({ 1210, 1230, 1250, 1270, 1290 }) + public int[] cables; + + @Config.Comment("MetaIDs of the GT machines for the generator slots") + @Config.DefaultIntList({ 1110, 1115, 1120, 1127 }) + public int[] generators; + + @Config.Comment("MetaIDs of the GT machines for the machine slots") + @Config.DefaultIntList({ 201, 211, 221, 231, 241, 251, 261, 271, 281, 291, 301, 311, 321, 331, 341, 351, + 361, 371, 381, 391, 401, 411, 421, 431, 441, 451, 461, 471, 481, 491, 501, 511, 521, 531, 541, 551, 561, + 571, 581, 591, 601, 611, 621, 631, 641, 651, 661, 671 }) + public int[] machines; + } + + @Config.Comment("Possible machines for MV ruins.") + public static class MV { + + @Config.Comment("MetaIDs of the GT machines for the buffer slots") + @Config.DefaultIntList({ 162, 172, 182, 192 }) + public int[] buffers; + + @Config.Comment("MetaIDs of the GT machines for the cable slots") + @Config.DefaultIntList({ 1310, 1330, 1350, 1370, 1390 }) + public int[] cables; + + @Config.Comment("MetaIDs of the GT machines for the generator slots") + @Config.DefaultIntList({ 1111, 12726, 1116, 1121, 1128 }) + public int[] generators; + + @Config.Comment("MetaIDs of the GT machines for the machine slots") + @Config.DefaultIntList({ 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 302, 312, 322, 332, 342, 352, + 362, 372, 382, 392, 402, 412, 422, 432, 442, 452, 462, 472, 482, 492, 502, 512, 522, 532, 542, 552, 562, + 572, 582, 592, 602, 612, 622, 632, 642, 652, 662, 672 }) + public int[] machines; + } + + @Config.Comment("Possible machines for HV ruins.") + public static class HV { + + @Config.Comment("MetaIDs of the GT machines for the buffer slots") + @Config.DefaultIntList({ 163, 173, 183, 193 }) + public int[] buffers; + + @Config.Comment("MetaIDs of the GT machines for the cable slots") + @Config.DefaultIntList({ 1410, 1430, 1450, 1470, 1490 }) + public int[] cables; + + @Config.Comment("MetaIDs of the GT machines for the generator slots") + @Config.DefaultIntList({ 1112, 12727, 1117, 1122, 1129 }) + public int[] generators; + + @Config.Comment("MetaIDs of the GT machines for the machine slots") + @Config.DefaultIntList({ 203, 213, 223, 233, 243, 253, 263, 273, 283, 293, 303, 313, 323, 333, 343, 353, + 363, 373, 383, 393, 403, 413, 423, 433, 443, 453, 463, 473, 483, 493, 503, 513, 523, 533, 543, 553, 563, + 573, 583, 593, 603, 613, 623, 633, 643, 653, 663, 673 }) + public int[] machines; + } + + @Config.Comment("Possible machines for EV ruins.") + public static class EV { + + @Config.Comment("MetaIDs of the GT machines for the buffer slots") + @Config.DefaultIntList({ 164, 174, 184, 194 }) + public int[] buffers; + + @Config.Comment("MetaIDs of the GT machines for the cable slots") + @Config.DefaultIntList({ 1510, 1530, 1550, 1570, 1590 }) + public int[] cables; + + @Config.Comment("MetaIDs of the GT machines for the generator slots") + @Config.DefaultIntList({ 12728, 1190, 1130, 12685 }) + public int[] generators; + + @Config.Comment("MetaIDs of the GT machines for the machine slots") + @Config.DefaultIntList({ 204, 214, 224, 234, 244, 254, 264, 274, 284, 294, 304, 314, 324, 334, 344, 354, + 364, 374, 384, 394, 404, 414, 424, 434, 444, 454, 464, 474, 484, 494, 504, 514, 524, 534, 544, 554, 564, + 574, 584, 594, 604, 614, 624, 634, 644, 654, 664, 674 }) + public int[] machines; + } + } +} diff --git a/src/main/java/bartworks/common/configs/LanderType.java b/src/main/java/bartworks/common/configs/LanderType.java new file mode 100644 index 0000000000..a392ec3e38 --- /dev/null +++ b/src/main/java/bartworks/common/configs/LanderType.java @@ -0,0 +1,7 @@ +package bartworks.common.configs; + +public enum LanderType { + MoonLander, + LandingBalloons, + AsteroidsLander; +} diff --git a/src/main/java/bartworks/common/loaders/ItemRegistry.java b/src/main/java/bartworks/common/loaders/ItemRegistry.java index 4cf95866a1..8d028a7d2e 100644 --- a/src/main/java/bartworks/common/loaders/ItemRegistry.java +++ b/src/main/java/bartworks/common/loaders/ItemRegistry.java @@ -187,7 +187,6 @@ import bartworks.common.blocks.BWBlocksGlass; import bartworks.common.blocks.BWBlocksGlass2; import bartworks.common.blocks.BWMachineBlockContainer; import bartworks.common.blocks.BWTileEntityContainer; -import bartworks.common.configs.ConfigHandler; import bartworks.common.items.BWItemBlocks; import bartworks.common.items.ItemCircuitProgrammer; import bartworks.common.items.ItemRockCutter; @@ -410,8 +409,7 @@ public class ItemRegistry { // GT2 stuff GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[0], BWItemBlocks.class, "BW_ItemBlocks"); GameRegistry.registerBlock(ItemRegistry.BW_BLOCKS[1], BWItemBlocks.class, "GT_LESU_CASING"); - if (ConfigHandler.teslastaff) - GameRegistry.registerItem(ItemRegistry.TESLASTAFF, ItemRegistry.TESLASTAFF.getUnlocalizedName()); + GameRegistry.registerItem(ItemRegistry.TESLASTAFF, ItemRegistry.TESLASTAFF.getUnlocalizedName()); GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_LV, ItemRegistry.ROCKCUTTER_LV.getUnlocalizedName()); GameRegistry.registerItem(ItemRegistry.ROCKCUTTER_MV, ItemRegistry.ROCKCUTTER_MV.getUnlocalizedName()); diff --git a/src/main/java/bartworks/common/loaders/RegisterServerCommands.java b/src/main/java/bartworks/common/loaders/RegisterServerCommands.java index f0bc69491a..7161eed1d3 100644 --- a/src/main/java/bartworks/common/loaders/RegisterServerCommands.java +++ b/src/main/java/bartworks/common/loaders/RegisterServerCommands.java @@ -13,7 +13,6 @@ package bartworks.common.loaders; -import bartworks.common.commands.ChangeConfig; import bartworks.common.commands.ClearCraftingCache; import bartworks.common.commands.GetWorkingDirectory; import bartworks.common.commands.PrintRecipeListToFile; @@ -25,7 +24,6 @@ public class RegisterServerCommands { public static void registerAll(FMLServerStartingEvent event) { event.registerServerCommand(new SummonRuin()); - event.registerServerCommand(new ChangeConfig()); event.registerServerCommand(new PrintRecipeListToFile()); event.registerServerCommand(new ClearCraftingCache()); event.registerServerCommand(new GetWorkingDirectory()); diff --git a/src/main/java/bartworks/common/loaders/recipes/CraftingRecipes.java b/src/main/java/bartworks/common/loaders/recipes/CraftingRecipes.java index 2cb768ec70..5473872dda 100644 --- a/src/main/java/bartworks/common/loaders/recipes/CraftingRecipes.java +++ b/src/main/java/bartworks/common/loaders/recipes/CraftingRecipes.java @@ -36,7 +36,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraftforge.oredict.OreDictionary; -import bartworks.common.configs.ConfigHandler; import bartworks.common.loaders.BioItemList; import bartworks.common.loaders.ItemRegistry; import bartworks.common.loaders.RecipeLoader; @@ -125,14 +124,12 @@ public class CraftingRecipes implements Runnable { GTOreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), 'C', "circuitAdvanced", 'B', ItemList.IC2_EnergyCrystal.get(1L) }); - if (ConfigHandler.teslastaff) { - GTModHandler.addCraftingRecipe( - new ItemStack(ItemRegistry.TESLASTAFF), - RecipeLoader.BITSD, - new Object[] { "BO ", "OP ", " P", 'O', - GTOreDictUnificator.get(OrePrefixes.wireGt16, Materials.SuperconductorUHV, 1L), 'B', - ItemList.Energy_LapotronicOrb.get(1L), 'P', "plateAlloyIridium", }); - } + GTModHandler.addCraftingRecipe( + new ItemStack(ItemRegistry.TESLASTAFF), + RecipeLoader.BITSD, + new Object[] { "BO ", "OP ", " P", 'O', + GTOreDictUnificator.get(OrePrefixes.wireGt16, Materials.SuperconductorUHV, 1L), 'B', + ItemList.Energy_LapotronicOrb.get(1L), 'P', "plateAlloyIridium", }); GTModHandler.addCraftingRecipe( new ItemStack(ItemRegistry.PUMPPARTS, 1, 0), // tube diff --git a/src/main/java/bartworks/common/net/ServerJoinedPacket.java b/src/main/java/bartworks/common/net/ServerJoinedPacket.java index e686d56182..8c6b89f28f 100644 --- a/src/main/java/bartworks/common/net/ServerJoinedPacket.java +++ b/src/main/java/bartworks/common/net/ServerJoinedPacket.java @@ -18,7 +18,6 @@ import net.minecraft.world.IBlockAccess; import com.google.common.io.ByteArrayDataInput; import bartworks.MainMod; -import bartworks.common.configs.ConfigHandler; import gregtech.api.net.GTPacketNew; import io.netty.buffer.ByteBuf; @@ -32,8 +31,7 @@ public class ServerJoinedPacket extends GTPacketNew { public ServerJoinedPacket(Object obj) { super(false); - this.config = (byte) (ConfigHandler.classicMode && ConfigHandler.disableExtraGassesForEBF ? 3 - : ConfigHandler.classicMode ? 2 : ConfigHandler.disableExtraGassesForEBF ? 1 : 0); + this.config = 0; } @Override @@ -54,8 +52,6 @@ public class ServerJoinedPacket extends GTPacketNew { @Override public void process(IBlockAccess iBlockAccess) { - boolean gas = (this.config & 1) != 0; - boolean classic = (this.config & 0b10) != 0; - MainMod.runOnPlayerJoined(classic, gas); + MainMod.runOnPlayerJoined(false, false); } } diff --git a/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java b/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java index 3f973e8eea..046ecb40f2 100644 --- a/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java +++ b/src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java @@ -47,7 +47,7 @@ import bartworks.API.ITileDropsContent; import bartworks.API.ITileHasDifferentTextureSides; import bartworks.API.modularUI.BWUITextures; import bartworks.MainMod; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import gregtech.api.util.GTUtility; import gregtech.common.Pollution; @@ -113,8 +113,8 @@ public class TileEntityHeatedWaterPump extends TileEntity implements ITileDropsC ++this.tick; --this.fuel; if (this.tick % 20 == 0) { - if (this.outputstack.amount <= 8000 - ConfigHandler.mbWaterperSec) - this.outputstack.amount += ConfigHandler.mbWaterperSec; + if (this.outputstack.amount <= 8000 - Configuration.singleBlocks.mbWaterperSec) + this.outputstack.amount += Configuration.singleBlocks.mbWaterperSec; this.tick = 0; } } @@ -167,7 +167,8 @@ public class TileEntityHeatedWaterPump extends TileEntity implements ITileDropsC .ifPresent(e -> { if (e.getTotalWorldTime() % 20 == 0) { Optional.ofNullable(e.getChunkFromBlockCoords(this.xCoord, this.zCoord)) - .ifPresent(c -> Pollution.addPollution(c, ConfigHandler.pollutionHeatedWaterPumpSecond)); + .ifPresent( + c -> Pollution.addPollution(c, Configuration.pollution.pollutionHeatedWaterPumpSecond)); } }); } @@ -330,10 +331,10 @@ public class TileEntityHeatedWaterPump extends TileEntity implements ITileDropsC public String[] getInfoData() { return new String[] { StatCollector.translateToLocal("tooltip.tile.waterpump.0.name") + " " - + GTUtility.formatNumbers(ConfigHandler.mbWaterperSec) + + GTUtility.formatNumbers(Configuration.singleBlocks.mbWaterperSec) + String.format( StatCollector.translateToLocal("tooltip.tile.waterpump.1.name"), - ConfigHandler.pollutionHeatedWaterPumpSecond), + Configuration.pollution.pollutionHeatedWaterPumpSecond), StatCollector.translateToLocal("tooltip.tile.waterpump.2.name") }; } diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java index b982c0d886..7859cc587d 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java @@ -56,7 +56,7 @@ import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.SideReference; import bartworks.API.recipe.BartWorksRecipeMaps; import bartworks.MainMod; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import bartworks.common.items.ItemLabParts; import bartworks.common.loaders.FluidLoader; import bartworks.common.net.RendererPacket; @@ -232,10 +232,10 @@ public class MTEBioVat extends MTEEnhancedMultiBlockBase<MTEBioVat> { } private int calcMod(double x) { - double y = this.getOutputCapacity() / 2D, z = ConfigHandler.bioVatMaxParallelBonus; + double y = this.getOutputCapacity() / 2D, z = Configuration.Multiblocks.bioVatMaxParallelBonus; int ret = MathUtils.ceilInt((-1D / y * Math.pow(x - y, 2D) + y) / y * z); - return MathUtils.clamp(1, ret, ConfigHandler.bioVatMaxParallelBonus); + return MathUtils.clamp(1, ret, Configuration.Multiblocks.bioVatMaxParallelBonus); } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEDeepEarthHeatingPump.java b/src/main/java/bartworks/common/tileentities/multis/MTEDeepEarthHeatingPump.java index fca10c20fd..d558e5466b 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEDeepEarthHeatingPump.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEDeepEarthHeatingPump.java @@ -26,7 +26,7 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -98,7 +98,7 @@ public class MTEDeepEarthHeatingPump extends MTEDrillerBase { tt.addMachineType("Geothermal Heat Pump") .addInfo("Consumes " + GTValues.V[this.mTier + 2] + "EU/t") .addInfo("Has 4 Modes, use the Screwdriver to change them:"); - if (ConfigHandler.DEHPDirectSteam) { + if (Configuration.multiblocks.DEHPDirectSteam) { tt.addInfo("0 Idle, 1 Steam, 2 Superheated Steam (requires Distilled Water), 3 Retract") .addInfo("Explodes when it runs out of Water/Distilled Water") .addInfo( @@ -233,7 +233,7 @@ public class MTEDeepEarthHeatingPump extends MTEDrillerBase { if (this.mMode == 0) { this.mMode = 1; } - if (ConfigHandler.DEHPDirectSteam) { + if (Configuration.multiblocks.DEHPDirectSteam) { if (this.mMode == 1) { long steamProduced = this.mTier * 600 * 2L * this.mEfficiency / 10000L; long waterConsume = (steamProduced + 160) / 160; diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java b/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java index 4b99f97ec5..1339c11095 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java @@ -67,7 +67,7 @@ import com.gtnewhorizon.structurelib.structure.StructureUtility; import bartworks.API.recipe.BartWorksRecipeMaps; import bartworks.MainMod; import bartworks.client.renderer.EICPistonVisualizer; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import bartworks.common.net.EICPacket; import bartworks.util.Coords; import cpw.mods.fml.relauncher.Side; @@ -95,7 +95,7 @@ import gregtech.api.util.OverclockCalculator; public class MTEElectricImplosionCompressor extends MTEExtendedPowerMultiBlockBase<MTEElectricImplosionCompressor> implements ISurvivalConstructable { - private static final boolean pistonEnabled = !ConfigHandler.disablePistonInEIC; + private static final boolean pistonEnabled = !Configuration.multiblocks.disablePistonInEIC; private Boolean piston = true; private static final SoundResource sound = SoundResource.RANDOM_EXPLODE; private final ArrayList<ChunkCoordinates> chunkCoordinates = new ArrayList<>(5); diff --git a/src/main/java/bartworks/common/tileentities/multis/MTELESU.java b/src/main/java/bartworks/common/tileentities/multis/MTELESU.java index a039aa593c..e2c393f889 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTELESU.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTELESU.java @@ -43,7 +43,7 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget; import bartworks.API.modularUI.BWUITextures; import bartworks.MainMod; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import bartworks.common.loaders.ItemRegistry; import bartworks.util.BWTooltipReference; import bartworks.util.ConnectedBlocksChecker; @@ -85,7 +85,7 @@ public class MTELESU extends MTEMultiBlockBase { public MTELESU(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - this.mStorage = ConfigHandler.energyPerCell; + this.mStorage = Configuration.multiblocks.energyPerCell; } public MTELESU(String aName) { @@ -136,7 +136,7 @@ public class MTELESU extends MTEMultiBlockBase { @Override public long maxEUOutput() { - return Math.min(Math.max(this.mStorage / ConfigHandler.energyPerCell, 1L), 32768L); + return Math.min(Math.max(this.mStorage / Configuration.multiblocks.energyPerCell, 1L), 32768L); } @Override @@ -177,7 +177,7 @@ public class MTELESU extends MTEMultiBlockBase { Collections.addAll(e, dsc); e.add( StatCollector.translateToLocal("tooltip.tile.lesu.1.name") + " " - + GTUtility.formatNumbers(ConfigHandler.energyPerCell) + + GTUtility.formatNumbers(Configuration.multiblocks.energyPerCell) + "EU"); dsc = StatCollector.translateToLocal("tooltip.tile.lesu.2.name") .split(";"); @@ -396,9 +396,10 @@ public class MTELESU extends MTEMultiBlockBase { } this.mEfficiency = this.getMaxEfficiency(null); - this.mStorage = ConfigHandler.energyPerCell * this.connectedcells.hashset.size() >= Long.MAX_VALUE - 1 - || ConfigHandler.energyPerCell * this.connectedcells.hashset.size() < 0 ? Long.MAX_VALUE - 1 - : ConfigHandler.energyPerCell * this.connectedcells.hashset.size(); + this.mStorage = Configuration.multiblocks.energyPerCell * this.connectedcells.hashset.size() + >= Long.MAX_VALUE - 1 || Configuration.multiblocks.energyPerCell * this.connectedcells.hashset.size() < 0 + ? Long.MAX_VALUE - 1 + : Configuration.multiblocks.energyPerCell * this.connectedcells.hashset.size(); this.mMaxProgresstime = 1; this.mProgresstime = 0; @@ -546,7 +547,7 @@ public class MTELESU extends MTEMultiBlockBase { () -> this.getBaseMetaTileEntity() .isActive() ? this.getBaseMetaTileEntity() - .getOutputVoltage() * ConfigHandler.energyPerCell + .getOutputVoltage() * Configuration.multiblocks.energyPerCell : 0, val -> clientMaxEU = val)) .widget( diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java index 8d5ea073db..58f00bf77c 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java @@ -46,7 +46,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.BorosilicateGlass; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import bartworks.util.BWUtil; import gregtech.api.GregTechAPI; import gregtech.api.enums.GTValues; @@ -148,7 +148,8 @@ public class MTEMegaBlastFurnace extends MegaMultiBlockBase<MTEMegaBlastFurnace> Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000) }; private int mHeatingCapacity; private byte glassTier; - private final static int polPtick = ConfigHandler.basePollutionMBFSecond / 20 * ConfigHandler.megaMachinesMax; + private final static int polPtick = Configuration.pollution.basePollutionMBFSecond / 20 + * Configuration.Multiblocks.megaMachinesMax; public MTEMegaBlastFurnace(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -312,7 +313,7 @@ public class MTEMegaBlastFurnace extends MegaMultiBlockBase<MTEMegaBlastFurnace> ? CheckRecipeResultRegistry.SUCCESSFUL : CheckRecipeResultRegistry.insufficientHeat(recipe.mSpecialValue); } - }.setMaxParallel(ConfigHandler.megaMachinesMax); + }.setMaxParallel(Configuration.Multiblocks.megaMachinesMax); } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java index e1366cec7d..3c15af0fae 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java @@ -39,7 +39,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.BorosilicateGlass; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import gregtech.api.GregTechAPI; import gregtech.api.enums.GTValues; import gregtech.api.interfaces.ITexture; @@ -178,7 +178,7 @@ public class MTEMegaChemicalReactor extends MegaMultiBlockBase<MTEMegaChemicalRe @Override protected ProcessingLogic createProcessingLogic() { return new ProcessingLogic().enablePerfectOverclock() - .setMaxParallel(ConfigHandler.megaMachinesMax); + .setMaxParallel(Configuration.Multiblocks.megaMachinesMax); } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java index 382b64fb47..ac6a0ae6b4 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java @@ -42,7 +42,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElementCheckOnly; import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IHatchElement; @@ -391,7 +391,7 @@ public class MTEMegaDistillTower extends MegaMultiBlockBase<MTEMegaDistillTower> @Override protected ProcessingLogic createProcessingLogic() { - return new ProcessingLogic().setMaxParallel(ConfigHandler.megaMachinesMax); + return new ProcessingLogic().setMaxParallel(Configuration.Multiblocks.megaMachinesMax); } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java index 4720b0b37c..3e2a73c725 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java @@ -49,7 +49,7 @@ import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.BorosilicateGlass; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import gregtech.api.GregTechAPI; import gregtech.api.enums.GTValues; import gregtech.api.enums.HeatingCoilLevel; @@ -220,7 +220,7 @@ public class MTEMegaOilCracker extends MegaMultiBlockBase<MTEMegaOilCracker> imp this.setEuModifier(1.0F - Math.min(0.1F * (MTEMegaOilCracker.this.heatLevel.getTier() + 1), 0.5F)); return super.process(); } - }.setMaxParallel(ConfigHandler.megaMachinesMax); + }.setMaxParallel(Configuration.Multiblocks.megaMachinesMax); } public HeatingCoilLevel getCoilLevel() { diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaVacuumFreezer.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaVacuumFreezer.java index e47782d980..a24f5d4b7e 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaVacuumFreezer.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaVacuumFreezer.java @@ -46,7 +46,7 @@ import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; -import bartworks.common.configs.ConfigHandler; +import bartworks.common.configs.Configuration; import gregtech.api.GregTechAPI; import gregtech.api.enums.Materials; import gregtech.api.enums.MaterialsUEVplus; @@ -424,7 +424,7 @@ public class MTEMegaVacuumFreezer extends MegaMultiBlockBase<MTEMegaVacuumFreeze .setHeatOC(true) .setHeatDiscount(false); } - }.setMaxParallel(ConfigHandler.megaMachinesMax); + }.setMaxParallel(Configuration.Multiblocks.megaMachinesMax); } @Override |