aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/bartworks/API/APIConfigValues.java20
-rw-r--r--src/main/java/bartworks/MainMod.java46
-rw-r--r--src/main/java/bartworks/client/gui/BWGuiFactory.java13
-rw-r--r--src/main/java/bartworks/client/gui/ConfigGUI.java17
-rw-r--r--src/main/java/bartworks/common/commands/ChangeConfig.java72
-rw-r--r--src/main/java/bartworks/common/configs/ConfigHandler.java301
-rw-r--r--src/main/java/bartworks/common/configs/Configuration.java245
-rw-r--r--src/main/java/bartworks/common/configs/LanderType.java7
-rw-r--r--src/main/java/bartworks/common/loaders/ItemRegistry.java4
-rw-r--r--src/main/java/bartworks/common/loaders/RegisterServerCommands.java2
-rw-r--r--src/main/java/bartworks/common/loaders/recipes/CraftingRecipes.java15
-rw-r--r--src/main/java/bartworks/common/net/ServerJoinedPacket.java8
-rw-r--r--src/main/java/bartworks/common/tileentities/classic/TileEntityHeatedWaterPump.java13
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java6
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEDeepEarthHeatingPump.java6
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java4
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/MTELESU.java17
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java7
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java4
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java4
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java4
-rw-r--r--src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaVacuumFreezer.java4
-rw-r--r--src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java6
-rw-r--r--src/main/java/bartworks/system/material/WerkstoffLoader.java5
-rw-r--r--src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java47
-rw-r--r--src/main/java/bartworks/system/oregen/BWWorldGenRoss128b.java4
-rw-r--r--src/main/java/bartworks/system/oregen/BWWorldGenRoss128ba.java4
-rw-r--r--src/main/java/bartworks/system/worldgen/BWWorldGenUtil.java142
-rw-r--r--src/main/java/bartworks/system/worldgen/MapGenRuins.java16
-rw-r--r--src/main/java/bartworks/util/BWUtil.java8
-rw-r--r--src/main/java/bwcrossmod/galacticgreg/VoidMinerUtility.java22
-rw-r--r--src/main/java/bwcrossmod/galacticraft/GalacticraftProxy.java4
-rw-r--r--src/main/java/bwcrossmod/galacticraft/PlanetsHelperClass.java8
-rw-r--r--src/main/java/bwcrossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java6
-rw-r--r--src/main/java/bwcrossmod/galacticraft/solarsystems/Ross128SolarSystem.java13
-rw-r--r--src/main/java/bwcrossmod/thaumcraft/util/ThaumcraftHandler.java5
-rw-r--r--src/main/java/gregtech/asm/GTCorePlugin.java16
-rw-r--r--src/main/java/gregtech/mixin/Mixin.java4
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang32
39 files changed, 576 insertions, 585 deletions
diff --git a/src/main/java/bartworks/API/APIConfigValues.java b/src/main/java/bartworks/API/APIConfigValues.java
deleted file mode 100644
index 7ab0326802..0000000000
--- a/src/main/java/bartworks/API/APIConfigValues.java
+++ /dev/null
@@ -1,20 +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.API;
-
-public class APIConfigValues {
-
- // One-Side-Only
- public static boolean debugLog = true;
-}
diff --git a/src/main/java/bartworks/MainMod.java b/src/main/java/bartworks/MainMod.java
index 7356fa9cc8..acf652c352 100644
--- a/src/main/java/bartworks/MainMod.java
+++ b/src/main/java/bartworks/MainMod.java
@@ -25,7 +25,6 @@ import net.minecraftforge.common.MinecraftForge;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import bartworks.API.APIConfigValues;
import bartworks.API.BioObjectAdder;
import bartworks.API.BioVatLogicAdder;
import bartworks.API.SideReference;
@@ -34,7 +33,7 @@ import bartworks.client.creativetabs.BartWorksTab;
import bartworks.client.creativetabs.BioTab;
import bartworks.client.creativetabs.GT2Tab;
import bartworks.client.textures.PrefixTextureLinker;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.common.items.BWItemBlocks;
import bartworks.common.loaders.ArtificialMicaLine;
import bartworks.common.loaders.BioCultureLoader;
@@ -53,7 +52,6 @@ import bartworks.system.material.CircuitGeneration.CircuitPartLoader;
import bartworks.system.material.Werkstoff;
import bartworks.system.material.WerkstoffLoader;
import bartworks.system.material.gtenhancement.PlatinumSludgeOverHaul;
-import bartworks.system.material.processingLoaders.DownTierLoader;
import bartworks.system.oredict.OreDictHandler;
import bartworks.util.ResultWrongSievert;
import bartworks.util.log.DebugLog;
@@ -75,17 +73,22 @@ import gregtech.api.enums.Mods;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
-@Mod(modid = MainMod.MOD_ID, name = MainMod.NAME, version = GT_Version.VERSION, dependencies = """
- required-after:IC2;\
- required-after:gregtech;\
- after:berriespp;\
- after:tectech;\
- after:GalacticraftMars;\
- after:GalacticraftCore;\
- after:Forestry;\
- after:ProjRed|Illumination;\
- after:RandomThings;\
- before:miscutils;""")
+@Mod(
+ modid = MainMod.MOD_ID,
+ name = MainMod.NAME,
+ version = GT_Version.VERSION,
+ guiFactory = "bartworks.client.gui.BWGuiFactory",
+ dependencies = """
+ required-after:IC2;\
+ required-after:gregtech;\
+ after:berriespp;\
+ after:tectech;\
+ after:GalacticraftMars;\
+ after:GalacticraftCore;\
+ after:Forestry;\
+ after:ProjRed|Illumination;\
+ after:RandomThings;\
+ before:miscutils;""")
public final class MainMod {
public static final String NAME = "BartWorks";
@@ -97,6 +100,8 @@ public final class MainMod {
public static final CreativeTabs BWT = new BartWorksTab(BartWorks.ID);
public static final IGuiHandler GH = new GuiHandler();
+ public static final boolean DEBUG = Boolean.getBoolean("bw.debug");
+
@Mod.Instance(MainMod.MOD_ID)
public static MainMod instance;
@@ -108,12 +113,10 @@ public final class MainMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent preinit) {
- MainMod.LOGGER.info("Found GT++, continuing");
-
GameRegistry.registerBlock(ItemRegistry.bw_glasses[0], BWItemBlocks.class, "BW_GlasBlocks");
GameRegistry.registerBlock(ItemRegistry.bw_glasses[1], BWItemBlocks.class, "BW_GlasBlocks2");
- if (APIConfigValues.debugLog) {
+ if (DEBUG) {
try {
DebugLog.initDebugLog(preinit);
} catch (IOException e) {
@@ -136,7 +139,7 @@ public final class MainMod {
@Mod.EventHandler
public void init(FMLInitializationEvent init) {
- if (SideReference.Side.Client && ConfigHandler.tooltips)
+ if (SideReference.Side.Client && Configuration.tooltip.addGlassTierInTooltips)
MinecraftForge.EVENT_BUS.register(new TooltipEventHandler());
ServerEventHandler serverEventHandler = new ServerEventHandler();
if (SideReference.Side.Server) {
@@ -177,7 +180,7 @@ public final class MainMod {
@Mod.EventHandler
public void onServerStarted(FMLServerStartedEvent event) {
- MainMod.runOnPlayerJoined(ConfigHandler.classicMode, ConfigHandler.disableExtraGassesForEBF);
+ MainMod.runOnPlayerJoined(false, false);
}
@Mod.EventHandler
@@ -198,10 +201,7 @@ public final class MainMod {
CircuitImprintLoader.run();
BioVatLogicAdder.RadioHatch.runBasicItemIntegration();
if (!recipesAdded) {
- if (!disableExtraGasRecipes) StaticRecipeChangeLoaders.addEBFGasRecipes();
-
- if (classicMode) DownTierLoader.run();
-
+ StaticRecipeChangeLoaders.addEBFGasRecipes();
recipesAdded = true;
}
diff --git a/src/main/java/bartworks/client/gui/BWGuiFactory.java b/src/main/java/bartworks/client/gui/BWGuiFactory.java
new file mode 100644
index 0000000000..3f8cc978af
--- /dev/null
+++ b/src/main/java/bartworks/client/gui/BWGuiFactory.java
@@ -0,0 +1,13 @@
+package bartworks.client.gui;
+
+import net.minecraft.client.gui.GuiScreen;
+
+import com.gtnewhorizon.gtnhlib.config.SimpleGuiFactory;
+
+public class BWGuiFactory implements SimpleGuiFactory {
+
+ @Override
+ public Class<? extends GuiScreen> mainConfigGuiClass() {
+ return ConfigGUI.class;
+ }
+}
diff --git a/src/main/java/bartworks/client/gui/ConfigGUI.java b/src/main/java/bartworks/client/gui/ConfigGUI.java
new file mode 100644
index 0000000000..1d11b7e8fb
--- /dev/null
+++ b/src/main/java/bartworks/client/gui/ConfigGUI.java
@@ -0,0 +1,17 @@
+package bartworks.client.gui;
+
+import static gregtech.api.enums.Mods.BartWorks;
+
+import net.minecraft.client.gui.GuiScreen;
+
+import com.gtnewhorizon.gtnhlib.config.ConfigException;
+import com.gtnewhorizon.gtnhlib.config.SimpleGuiConfig;
+
+import bartworks.common.configs.Configuration;
+
+public class ConfigGUI extends SimpleGuiConfig {
+
+ public ConfigGUI(GuiScreen parentScreen) throws ConfigException {
+ super(parentScreen, BartWorks.ID, "BartWorks", Configuration.class);
+ }
+}
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
diff --git a/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java b/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
index c81f62e2ab..8e04f770f8 100644
--- a/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
+++ b/src/main/java/bartworks/system/material/CircuitGeneration/CircuitImprintLoader.java
@@ -35,7 +35,6 @@ import com.google.common.collect.HashBiMap;
import bartworks.API.recipe.BWNBTDependantCraftingRecipe;
import bartworks.API.recipe.BartWorksRecipeMaps;
import bartworks.ASM.BWCoreStaticReplacementMethodes;
-import bartworks.common.configs.ConfigHandler;
import bartworks.system.material.WerkstoffLoader;
import bartworks.util.BWUtil;
import bartworks.util.Pair;
@@ -43,6 +42,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.util.GTModHandler;
import gregtech.api.util.GTOreDictUnificator;
@@ -113,7 +113,7 @@ public class CircuitImprintLoader {
GTRecipe newRecipe = CircuitImprintLoader.reBuildRecipe(circuitRecipe);
if (newRecipe != null) BartWorksRecipeMaps.circuitAssemblyLineRecipes.addRecipe(newRecipe);
addCutoffRecipeToSets(toRem, toAdd, circuitRecipe);
- } else if (circuitRecipe.mEUt > BWUtil.getTierVoltage(ConfigHandler.cutoffTier)) toRem.add(circuitRecipe);
+ } else if (circuitRecipe.mEUt > TierEU.IV) toRem.add(circuitRecipe);
}
}
@@ -133,7 +133,7 @@ public class CircuitImprintLoader {
private static void addCutoffRecipeToSets(HashSet<GTRecipe> toRem, HashSet<GTRecipe> toAdd,
GTRecipe circuitRecipe) {
- if (circuitRecipe.mEUt > BWUtil.getTierVoltage(ConfigHandler.cutoffTier)) {
+ if (circuitRecipe.mEUt > TierEU.IV) {
toRem.add(circuitRecipe);
toAdd.add(CircuitImprintLoader.makeMoreExpensive(circuitRecipe));
}
diff --git a/src/main/java/bartworks/system/material/WerkstoffLoader.java b/src/main/java/bartworks/system/material/WerkstoffLoader.java
index 858fda7a58..a1b1aac2ed 100644
--- a/src/main/java/bartworks/system/material/WerkstoffLoader.java
+++ b/src/main/java/bartworks/system/material/WerkstoffLoader.java
@@ -95,7 +95,6 @@ import bartworks.API.SideReference;
import bartworks.API.WerkstoffAdderRegistry;
import bartworks.MainMod;
import bartworks.client.renderer.BWBlockOreRenderer;
-import bartworks.common.configs.ConfigHandler;
import bartworks.system.material.CircuitGeneration.BWCircuitsLoader;
import bartworks.system.material.gtenhancement.GTMetaItemEnhancer;
import bartworks.system.material.processingLoaders.AdditionalRecipes;
@@ -1956,11 +1955,11 @@ public class WerkstoffLoader {
GameRegistry.registerBlock(WerkstoffLoader.BWOres, BWItemMetaGeneratedBlock.class, "bw.blockores.01");
GameRegistry.registerBlock(WerkstoffLoader.BWSmallOres, BWItemMetaGeneratedBlock.class, "bw.blockores.02");
GameRegistry.registerBlock(WerkstoffLoader.BWBlocks, BWItemMetaGeneratedBlock.class, "bw.werkstoffblocks.01");
- if (!ConfigHandler.disableBoltedBlocksCasing) GameRegistry.registerBlock(
+ GameRegistry.registerBlock(
WerkstoffLoader.BWBlockCasings,
BWItemMetaGeneratedBlock.class,
"bw.werkstoffblockscasing.01");
- if (!ConfigHandler.disableReboltedBlocksCasing) GameRegistry.registerBlock(
+ GameRegistry.registerBlock(
WerkstoffLoader.BWBlockCasingsAdvanced,
BWItemMetaGeneratedBlock.class,
"bw.werkstoffblockscasingadvanced.01");
diff --git a/src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java b/src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java
deleted file mode 100644
index 7be8b72bf0..0000000000
--- a/src/main/java/bartworks/system/material/processingLoaders/DownTierLoader.java
+++ /dev/null
@@ -1,47 +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.system.material.processingLoaders;
-
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-import bartworks.util.BWUtil;
-import bartworks.util.StreamUtils;
-import gregtech.api.recipe.RecipeMap;
-import gregtech.api.recipe.RecipeMaps;
-import gregtech.api.util.GTRecipe;
-
-public class DownTierLoader {
-
- public static void run() {
- RecipeMap.ALL_RECIPE_MAPS.values()
- .stream()
- .filter(map -> StreamUtils.filterVisualMaps(map) && map != RecipeMaps.fusionRecipes)
- .forEach(map -> {
- Set<GTRecipe> newRecipes = new HashSet<>();
- Set<GTRecipe> toRem = new HashSet<>();
- map.getAllRecipes()
- .stream()
- .filter(recipe -> Objects.nonNull(recipe) && recipe.mEUt > 128)
- .forEach(recipe -> {
- toRem.add(recipe);
- newRecipes.add(BWUtil.copyAndSetTierToNewRecipe(recipe, (byte) 2));
- });
- map.getBackend()
- .removeRecipes(toRem);
- newRecipes.forEach(map::add);
- });
- }
-}
diff --git a/src/main/java/bartworks/system/oregen/BWWorldGenRoss128b.java b/src/main/java/bartworks/system/oregen/BWWorldGenRoss128b.java
index 2c996c4668..8c50a2803e 100644
--- a/src/main/java/bartworks/system/oregen/BWWorldGenRoss128b.java
+++ b/src/main/java/bartworks/system/oregen/BWWorldGenRoss128b.java
@@ -29,7 +29,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.system.material.WerkstoffLoader;
import bwcrossmod.galacticraft.planets.ross128b.WorldProviderRoss128b;
import gregtech.api.interfaces.ISubTagContainer;
@@ -183,6 +183,6 @@ public class BWWorldGenRoss128b extends BWOreLayer {
@Override
public boolean isGenerationAllowed(String aDimName, int aDimensionType, int aAllowedDimensionType) {
- return aDimensionType == ConfigHandler.ross128BID;
+ return aDimensionType == Configuration.crossModInteractions.ross128BID;
}
}
diff --git a/src/main/java/bartworks/system/oregen/BWWorldGenRoss128ba.java b/src/main/java/bartworks/system/oregen/BWWorldGenRoss128ba.java
index d4df2b8340..74b4ec51ae 100644
--- a/src/main/java/bartworks/system/oregen/BWWorldGenRoss128ba.java
+++ b/src/main/java/bartworks/system/oregen/BWWorldGenRoss128ba.java
@@ -26,7 +26,7 @@ import net.minecraft.block.Block;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.system.material.WerkstoffLoader;
import bwcrossmod.galacticraft.planets.ross128ba.WorldProviderRoss128ba;
import gregtech.api.interfaces.ISubTagContainer;
@@ -171,6 +171,6 @@ public class BWWorldGenRoss128ba extends BWOreLayer {
@Override
public boolean isGenerationAllowed(String aDimName, int aDimensionType, int aAllowedDimensionType) {
- return aDimensionType == ConfigHandler.ross128BAID;
+ return aDimensionType == Configuration.crossModInteractions.ross128BAID;
}
}
diff --git a/src/main/java/bartworks/system/worldgen/BWWorldGenUtil.java b/src/main/java/bartworks/system/worldgen/BWWorldGenUtil.java
index db32462ca4..3dd8cfffca 100644
--- a/src/main/java/bartworks/system/worldgen/BWWorldGenUtil.java
+++ b/src/main/java/bartworks/system/worldgen/BWWorldGenUtil.java
@@ -17,7 +17,7 @@ import java.util.Random;
import net.minecraft.block.Block;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import gregtech.api.GregTechAPI;
public class BWWorldGenUtil {
@@ -26,23 +26,139 @@ public class BWWorldGenUtil {
public static final Block GT_TILES = GregTechAPI.sBlockMachines;
- public static short getGenerator(Random rand, int tier) {
- int meta = ConfigHandler.metasForTiers[0][tier][rand.nextInt(ConfigHandler.metasForTiers[0][tier].length)];
- return GregTechAPI.METATILEENTITIES[meta] != null ? (short) meta : BWWorldGenUtil.getGenerator(rand, tier);
+ public static int getGenerator(Random rand, int tier) {
+ int meta, randomIndex;
+ switch (tier) {
+ case 0 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.highPressureSteam.generators.length);
+ meta = Configuration.rossRuinMetas.highPressureSteam.generators[randomIndex];
+ }
+ case 1 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.lv.generators.length);
+ meta = Configuration.rossRuinMetas.lv.generators[randomIndex];
+ }
+ case 2 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.mv.generators.length);
+ meta = Configuration.rossRuinMetas.mv.generators[randomIndex];
+ }
+ case 3 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.hv.generators.length);
+ meta = Configuration.rossRuinMetas.hv.generators[randomIndex];
+ }
+ case 4 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.ev.generators.length);
+ meta = Configuration.rossRuinMetas.ev.generators[randomIndex];
+ }
+ default -> {
+ throw new IllegalStateException("tier " + tier + " is not allowed for Ross Ruins.");
+ }
+ }
+ if (GregTechAPI.METATILEENTITIES[meta] == null) {
+ throw new IllegalStateException("MetaID " + meta + " is null, please remove it from the Ross Ruin config");
+ }
+
+ return meta;
}
- public static short getBuffer(Random rand, int tier) {
- int meta = ConfigHandler.metasForTiers[1][tier][rand.nextInt(ConfigHandler.metasForTiers[1][tier].length)];
- return GregTechAPI.METATILEENTITIES[meta] != null ? (short) meta : BWWorldGenUtil.getBuffer(rand, tier);
+ public static int getBuffer(Random rand, int tier) {
+ int meta, randomIndex;
+ switch (tier) {
+ case 0 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.highPressureSteam.buffers.length);
+ meta = Configuration.rossRuinMetas.highPressureSteam.buffers[randomIndex];
+ }
+ case 1 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.lv.buffers.length);
+ meta = Configuration.rossRuinMetas.lv.buffers[randomIndex];
+ }
+ case 2 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.mv.buffers.length);
+ meta = Configuration.rossRuinMetas.mv.buffers[randomIndex];
+ }
+ case 3 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.hv.buffers.length);
+ meta = Configuration.rossRuinMetas.hv.buffers[randomIndex];
+ }
+ case 4 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.ev.buffers.length);
+ meta = Configuration.rossRuinMetas.ev.buffers[randomIndex];
+ }
+ default -> {
+ throw new IllegalStateException("tier " + tier + " is not allowed for Ross Ruins.");
+ }
+ }
+ if (GregTechAPI.METATILEENTITIES[meta] == null) {
+ throw new IllegalStateException("MetaID " + meta + " is null, please remove it from the Ross Ruin config");
+ }
+
+ return meta;
}
- public static short getCable(Random rand, int tier) {
- int meta = ConfigHandler.metasForTiers[2][tier][rand.nextInt(ConfigHandler.metasForTiers[2][tier].length)];
- return GregTechAPI.METATILEENTITIES[meta] != null ? (short) meta : BWWorldGenUtil.getCable(rand, tier);
+ public static int getCable(Random rand, int tier) {
+ int meta, randomIndex;
+ switch (tier) {
+ case 0 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.highPressureSteam.cables.length);
+ meta = Configuration.rossRuinMetas.highPressureSteam.cables[randomIndex];
+ }
+ case 1 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.lv.cables.length);
+ meta = Configuration.rossRuinMetas.lv.cables[randomIndex];
+ }
+ case 2 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.mv.cables.length);
+ meta = Configuration.rossRuinMetas.mv.cables[randomIndex];
+ }
+ case 3 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.hv.cables.length);
+ meta = Configuration.rossRuinMetas.hv.cables[randomIndex];
+ }
+ case 4 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.ev.cables.length);
+ meta = Configuration.rossRuinMetas.ev.cables[randomIndex];
+ }
+ default -> {
+ throw new IllegalStateException("tier " + tier + " is not allowed for Ross Ruins.");
+ }
+ }
+ if (GregTechAPI.METATILEENTITIES[meta] == null) {
+ throw new IllegalStateException("MetaID " + meta + " is null, please remove it from the Ross Ruin config");
+ }
+
+ return meta;
}
- public static short getMachine(Random rand, int tier) {
- int meta = ConfigHandler.metasForTiers[3][tier][rand.nextInt(ConfigHandler.metasForTiers[3][tier].length)];
- return GregTechAPI.METATILEENTITIES[meta] != null ? (short) meta : BWWorldGenUtil.getMachine(rand, tier);
+ public static int getMachine(Random rand, int tier) {
+ int meta, randomIndex;
+ switch (tier) {
+ case 0 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.highPressureSteam.machines.length);
+ meta = Configuration.rossRuinMetas.highPressureSteam.machines[randomIndex];
+ }
+ case 1 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.lv.machines.length);
+ meta = Configuration.rossRuinMetas.lv.machines[randomIndex];
+ }
+ case 2 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.mv.machines.length);
+ meta = Configuration.rossRuinMetas.mv.machines[randomIndex];
+ }
+ case 3 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.hv.machines.length);
+ meta = Configuration.rossRuinMetas.hv.machines[randomIndex];
+ }
+ case 4 -> {
+ randomIndex = rand.nextInt(Configuration.rossRuinMetas.ev.machines.length);
+ meta = Configuration.rossRuinMetas.ev.machines[randomIndex];
+ }
+ default -> {
+ throw new IllegalStateException("tier " + tier + " is not allowed for Ross Ruins.");
+ }
+ }
+ if (GregTechAPI.METATILEENTITIES[meta] == null) {
+ throw new IllegalStateException("MetaID " + meta + " is null, please remove it from the Ross Ruin config");
+ }
+
+ return meta;
}
}
diff --git a/src/main/java/bartworks/system/worldgen/MapGenRuins.java b/src/main/java/bartworks/system/worldgen/MapGenRuins.java
index a5668fb7ed..b8489ccce4 100644
--- a/src/main/java/bartworks/system/worldgen/MapGenRuins.java
+++ b/src/main/java/bartworks/system/worldgen/MapGenRuins.java
@@ -13,7 +13,6 @@
package bartworks.system.worldgen;
-import static bartworks.common.configs.ConfigHandler.maxTierRoss;
import static net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST;
import java.security.SecureRandom;
@@ -29,6 +28,7 @@ import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.util.ForgeDirection;
+import bartworks.common.configs.Configuration;
import bartworks.util.Pair;
import gregtech.api.GregTechAPI;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -225,11 +225,11 @@ public abstract class MapGenRuins extends WorldGenerator {
this.setMiscBlocks(new int[] { 1 }, Blocks.log);
this.statBlocks = new int[] { rand.nextInt(this.ToBuildWith[0].length) };
int colored = rand.nextInt(15);
- int tier = secureRandom.nextInt(maxTierRoss);
+ int tier = secureRandom.nextInt(Configuration.RossRuinMetas.maxTierRoss);
boolean useColor = rand.nextBoolean();
byte set = 0;
- byte toSet = (byte) (rand.nextInt(maxTierRoss - tier) + 1);
- short cablemeta = BWWorldGenUtil.getCable(secureRandom, tier);
+ byte toSet = (byte) (rand.nextInt(Configuration.RossRuinMetas.maxTierRoss - tier) + 1);
+ int cablemeta = BWWorldGenUtil.getCable(secureRandom, tier);
byte treeinaRow = 0;
boolean lastset = rand.nextBoolean();
for (int dx = -6; dx <= 6; dx++) {
@@ -316,7 +316,7 @@ public abstract class MapGenRuins extends WorldGenerator {
}
if (dx == 4 && dz == 4) {
- short meta = BWWorldGenUtil.getGenerator(secureRandom, tier);
+ int meta = BWWorldGenUtil.getGenerator(secureRandom, tier);
this.setGTMachine(
worldObj,
x + dx,
@@ -327,7 +327,7 @@ public abstract class MapGenRuins extends WorldGenerator {
tier > 0 ? ForgeDirection.WEST : ForgeDirection.UP);
} else if (dx == 3 && dz == 4) {
if (tier > 0) {
- short meta = BWWorldGenUtil.getBuffer(secureRandom, tier);
+ int meta = BWWorldGenUtil.getBuffer(secureRandom, tier);
this.setGTMachine(
worldObj,
x + dx,
@@ -343,7 +343,7 @@ public abstract class MapGenRuins extends WorldGenerator {
this.setGTCablekWChance(worldObj, x + dx, y + dy, z + dz, rand, 33, cablemeta);
} else if (dx < 3 && dx > -5 && dz == 3 && set < toSet) {
if (!lastset || treeinaRow > 2) {
- short meta = BWWorldGenUtil.getMachine(secureRandom, tier);
+ int meta = BWWorldGenUtil.getMachine(secureRandom, tier);
this.setGTMachine(
worldObj,
x + dx,
@@ -481,7 +481,7 @@ public abstract class MapGenRuins extends WorldGenerator {
break tosetloop;
}
if (!lastset || treeinaRow > 2 && worldObj.getTileEntity(x + dx, y + dy, z + dz) == null) {
- short meta = BWWorldGenUtil.getMachine(secureRandom, tier);
+ int meta = BWWorldGenUtil.getMachine(secureRandom, tier);
this.setGTMachine(worldObj, x + dx, y + dy, z + dz, meta, owner, ForgeDirection.UP);
set++;
diff --git a/src/main/java/bartworks/util/BWUtil.java b/src/main/java/bartworks/util/BWUtil.java
index 5f740af40f..be201e10bd 100644
--- a/src/main/java/bartworks/util/BWUtil.java
+++ b/src/main/java/bartworks/util/BWUtil.java
@@ -295,14 +295,6 @@ public class BWUtil {
return (int) (30 * Math.pow(4, tier - 1));
}
- public static long getTierVoltage(int tier) {
- return getTierVoltage((byte) tier);
- }
-
- public static long getTierVoltage(byte tier) {
- return 8L << 2 * tier;
- }
-
public static byte getTier(long voltage) {
if (voltage <= Integer.MAX_VALUE - 7) return GTUtility.getTier(voltage);
byte t = 0;
diff --git a/src/main/java/bwcrossmod/galacticgreg/VoidMinerUtility.java b/src/main/java/bwcrossmod/galacticgreg/VoidMinerUtility.java
index b0782f91ae..237b155274 100644
--- a/src/main/java/bwcrossmod/galacticgreg/VoidMinerUtility.java
+++ b/src/main/java/bwcrossmod/galacticgreg/VoidMinerUtility.java
@@ -2,9 +2,13 @@ package bwcrossmod.galacticgreg;
import static galacticgreg.registry.GalacticGregRegistry.getModContainers;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.function.Predicate;
import net.minecraft.block.Block;
@@ -13,7 +17,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.system.material.Werkstoff;
import bartworks.system.material.WerkstoffLoader;
import bartworks.system.oregen.BWOreLayer;
@@ -42,9 +46,13 @@ public class VoidMinerUtility {
private float totalWeight;
private final Map<GTUtility.ItemId, Float> internalMap;
+ private final Set<String> voidMinerBlacklistedDrops;
+
public DropMap() {
internalMap = new HashMap<>();
totalWeight = 0;
+ voidMinerBlacklistedDrops = Collections
+ .unmodifiableSet(new HashSet<>(Arrays.asList(Configuration.multiblocks.voidMinerBlacklist)));
}
/**
@@ -67,7 +75,7 @@ public class VoidMinerUtility {
* @param weight the non normalised weight
*/
public void addDrop(Block block, int meta, float weight) {
- if (ConfigHandler.voidMinerBlacklist.contains(
+ if (this.voidMinerBlacklistedDrops.contains(
String.format(
"%s:%d",
GameRegistry.findUniqueIdentifierFor(block)
@@ -86,7 +94,7 @@ public class VoidMinerUtility {
public void addDrop(ItemStack itemStack, float weight) {
Item item = itemStack.getItem();
int meta = Items.feather.getDamage(itemStack);
- if (ConfigHandler.voidMinerBlacklist.contains(
+ if (this.voidMinerBlacklistedDrops.contains(
String.format(
"%s:%d",
GameRegistry.findUniqueIdentifierFor(Block.getBlockFromItem(item))
@@ -133,8 +141,12 @@ public class VoidMinerUtility {
dropMapsByDimId.put(7, getDropMapVanilla(7));
// ross dims
- dropMapsByDimId.put(ConfigHandler.ross128BID, getDropMapRoss(ConfigHandler.ross128BID));
- dropMapsByDimId.put(ConfigHandler.ross128BAID, getDropMapRoss(ConfigHandler.ross128BAID));
+ dropMapsByDimId.put(
+ Configuration.crossModInteractions.ross128BID,
+ getDropMapRoss(Configuration.crossModInteractions.ross128BID));
+ dropMapsByDimId.put(
+ Configuration.crossModInteractions.ross128BAID,
+ getDropMapRoss(Configuration.crossModInteractions.ross128BAID));
// other space dims
for (ModContainer modContainer : getModContainers()) {
diff --git a/src/main/java/bwcrossmod/galacticraft/GalacticraftProxy.java b/src/main/java/bwcrossmod/galacticraft/GalacticraftProxy.java
index d6ee41c48b..9ad58820d0 100644
--- a/src/main/java/bwcrossmod/galacticraft/GalacticraftProxy.java
+++ b/src/main/java/bwcrossmod/galacticraft/GalacticraftProxy.java
@@ -16,7 +16,7 @@ package bwcrossmod.galacticraft;
import net.minecraftforge.common.MinecraftForge;
import bartworks.API.SideReference;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.system.oregen.BWWorldGenRoss128b;
import bartworks.system.oregen.BWWorldGenRoss128ba;
import bwcrossmod.galacticraft.atmosphere.BWAtmosphereManager;
@@ -71,7 +71,7 @@ public class GalacticraftProxy {
private static void clientInit(FMLInitializationEvent e) {}
private static void commonInit(FMLInitializationEvent e) {
- if (ConfigHandler.Ross128Enabled) Ross128SolarSystem.init();
+ if (Configuration.crossModInteractions.Ross128Enabled) Ross128SolarSystem.init();
}
private static void serverPostInit(FMLPostInitializationEvent e) {}
diff --git a/src/main/java/bwcrossmod/galacticraft/PlanetsHelperClass.java b/src/main/java/bwcrossmod/galacticraft/PlanetsHelperClass.java
index eecd5bd8fe..e5b43ef886 100644
--- a/src/main/java/bwcrossmod/galacticraft/PlanetsHelperClass.java
+++ b/src/main/java/bwcrossmod/galacticraft/PlanetsHelperClass.java
@@ -15,7 +15,7 @@ package bwcrossmod.galacticraft;
import net.minecraft.entity.player.EntityPlayerMP;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import micdoodle8.mods.galacticraft.core.entities.EntityLander;
import micdoodle8.mods.galacticraft.core.entities.EntityLanderBase;
import micdoodle8.mods.galacticraft.planets.asteroids.entities.EntityEntryPod;
@@ -24,9 +24,9 @@ import micdoodle8.mods.galacticraft.planets.mars.entities.EntityLandingBalloons;
public class PlanetsHelperClass {
public static EntityLanderBase getLanderType(EntityPlayerMP player) {
- return switch (ConfigHandler.landerType) {
- case 1 -> new EntityLander(player);
- case 2 -> new EntityLandingBalloons(player);
+ return switch (Configuration.crossModInteractions.landerType) {
+ case MoonLander -> new EntityLander(player);
+ case LandingBalloons -> new EntityLandingBalloons(player);
default -> new EntityEntryPod(player);
};
}
diff --git a/src/main/java/bwcrossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java b/src/main/java/bwcrossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
index 7682e61d09..ba9414250c 100644
--- a/src/main/java/bwcrossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
+++ b/src/main/java/bwcrossmod/galacticraft/planets/ross128b/ChunkProviderRoss128b.java
@@ -37,7 +37,7 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
import net.minecraftforge.event.terraingen.TerrainGen;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bartworks.system.oregen.BWWordGenerator;
import bartworks.system.worldgen.MapGenRuins;
import bwcrossmod.thaumcraft.util.ThaumcraftHandler;
@@ -82,7 +82,7 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
if (Thaumcraft.isModLoaded()) {
if (ThaumcraftHandler.isTaintBiome(biomeGenBase.biomeID))
this.biomesForGeneration[i] = BiomeGenBase.taiga;
- else if (ConfigHandler.disableMagicalForest
+ else if (Configuration.crossModInteractions.disableMagicalForest
&& ThaumcraftHandler.isMagicalForestBiome(biomeGenBase.biomeID))
this.biomesForGeneration[i] = BiomeGenBase.birchForest;
}
@@ -134,7 +134,7 @@ public class ChunkProviderRoss128b extends ChunkProviderGenerate {
&& biomegenbase != BiomeGenBase.river
&& biomegenbase != BiomeGenBase.frozenOcean
&& biomegenbase != BiomeGenBase.frozenRiver
- && this.rand.nextInt(ConfigHandler.ross128bRuinChance) == 0) {
+ && this.rand.nextInt(Configuration.crossModInteractions.ross128bRuinChance) == 0) {
x1 = k + this.rand.nextInt(16) + 3;
y1 = this.rand.nextInt(256);
z1 = l + this.rand.nextInt(16) + 3;
diff --git a/src/main/java/bwcrossmod/galacticraft/solarsystems/Ross128SolarSystem.java b/src/main/java/bwcrossmod/galacticraft/solarsystems/Ross128SolarSystem.java
index 050c26b087..7113e091f8 100644
--- a/src/main/java/bwcrossmod/galacticraft/solarsystems/Ross128SolarSystem.java
+++ b/src/main/java/bwcrossmod/galacticraft/solarsystems/Ross128SolarSystem.java
@@ -13,13 +13,11 @@
package bwcrossmod.galacticraft.solarsystems;
-import static gregtech.api.enums.Mods.GalaxySpace;
-
import java.util.Arrays;
import net.minecraft.util.ResourceLocation;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import bwcrossmod.BartWorksCrossmod;
import bwcrossmod.galacticraft.UniversalTeleportType;
import bwcrossmod.galacticraft.planets.ross128b.WorldProviderRoss128b;
@@ -64,17 +62,18 @@ public class Ross128SolarSystem {
Ross128SolarSystem.Ross128b.setRelativeOrbitTime(0.65F);
Ross128SolarSystem.Ross128b.atmosphere
.addAll(Arrays.asList(IAtmosphericGas.OXYGEN, IAtmosphericGas.NITROGEN, IAtmosphericGas.ARGON));
- Ross128SolarSystem.Ross128b.setDimensionInfo(ConfigHandler.ross128BID, WorldProviderRoss128b.class);
- Ross128SolarSystem.Ross128b.setTierRequired(ConfigHandler.ross128btier);
+ Ross128SolarSystem.Ross128b
+ .setDimensionInfo(Configuration.crossModInteractions.ross128BID, WorldProviderRoss128b.class);
+ Ross128SolarSystem.Ross128b.setTierRequired(Configuration.CrossModInteractions.ross128btier);
Ross128SolarSystem.Ross128ba = new Moon("Ross128ba").setParentPlanet(Ross128SolarSystem.Ross128b);
Ross128SolarSystem.Ross128ba.setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(10f, 15f))
.setRelativeOrbitTime(1 / 0.01F);
Ross128SolarSystem.Ross128ba.setBodyIcon(
new ResourceLocation(BartWorksCrossmod.MOD_ID + ":galacticraft/Ross128b/MapObjs/Ross128ba.png"));
- Ross128SolarSystem.Ross128ba.setDimensionInfo(ConfigHandler.ross128BAID, WorldProviderRoss128ba.class);
Ross128SolarSystem.Ross128ba
- .setTierRequired(GalaxySpace.isModLoaded() ? Math.min(ConfigHandler.ross128btier + 2, 8) : 3);
+ .setDimensionInfo(Configuration.crossModInteractions.ross128BAID, WorldProviderRoss128ba.class);
+ Ross128SolarSystem.Ross128ba.setTierRequired(Configuration.CrossModInteractions.ross128batier);
GalaxyRegistry.registerSolarSystem(Ross128SolarSystem.Ross128System);
GalaxyRegistry.registerPlanet(Ross128SolarSystem.Ross128b);
diff --git a/src/main/java/bwcrossmod/thaumcraft/util/ThaumcraftHandler.java b/src/main/java/bwcrossmod/thaumcraft/util/ThaumcraftHandler.java
index caaf8aea60..a232459303 100644
--- a/src/main/java/bwcrossmod/thaumcraft/util/ThaumcraftHandler.java
+++ b/src/main/java/bwcrossmod/thaumcraft/util/ThaumcraftHandler.java
@@ -13,9 +13,10 @@
package bwcrossmod.thaumcraft.util;
+import static bartworks.MainMod.DEBUG;
+
import net.minecraft.item.ItemStack;
-import bartworks.API.APIConfigValues;
import bartworks.util.Pair;
import bartworks.util.log.DebugLog;
import thaumcraft.api.ThaumcraftApi;
@@ -42,7 +43,7 @@ public class ThaumcraftHandler {
for (Pair<Object, Integer> a : aspectPair) {
Aspect aspect = (Aspect) a.getKey();
int amount = a.getValue();
- if (APIConfigValues.debugLog) DebugLog.log(
+ if (DEBUG) DebugLog.log(
"Stack:" + stack.getDisplayName()
+ " Damage:"
+ stack.getItemDamage()
diff --git a/src/main/java/gregtech/asm/GTCorePlugin.java b/src/main/java/gregtech/asm/GTCorePlugin.java
index 777cad836a..17359a3988 100644
--- a/src/main/java/gregtech/asm/GTCorePlugin.java
+++ b/src/main/java/gregtech/asm/GTCorePlugin.java
@@ -5,11 +5,11 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import net.minecraftforge.common.config.Configuration;
-
+import com.gtnewhorizon.gtnhlib.config.ConfigException;
+import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
import com.gtnewhorizon.gtnhmixins.IEarlyMixinLoader;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import cpw.mods.fml.relauncher.FMLInjectionData;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import gregtech.mixin.Mixin;
@@ -24,6 +24,14 @@ import gtPlusPlus.preloader.asm.transformers.Preloader_Transformer_Handler;
@IFMLLoadingPlugin.Name("GregTech 5 Unofficial core plugin")
public class GTCorePlugin implements IFMLLoadingPlugin, IEarlyMixinLoader {
+ static {
+ try {
+ ConfigurationManager.registerConfig(Configuration.class);
+ } catch (ConfigException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
public static File minecraftDir;
private static Boolean islwjgl3Present = null;
@@ -31,8 +39,6 @@ public class GTCorePlugin implements IFMLLoadingPlugin, IEarlyMixinLoader {
// Injection Code taken from CodeChickenLib
if (minecraftDir != null) return; // get called twice, once for IFMLCallHook
minecraftDir = (File) FMLInjectionData.data()[6];
- // do all the configuration already now...
- new ConfigHandler(new Configuration(new File(new File(minecraftDir, "config"), "bartworks.cfg")));
}
@Override
diff --git a/src/main/java/gregtech/mixin/Mixin.java b/src/main/java/gregtech/mixin/Mixin.java
index 4e8bea7481..b83b0d61b7 100644
--- a/src/main/java/gregtech/mixin/Mixin.java
+++ b/src/main/java/gregtech/mixin/Mixin.java
@@ -12,7 +12,7 @@ import java.util.function.Supplier;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import bartworks.common.configs.ConfigHandler;
+import bartworks.common.configs.Configuration;
import cpw.mods.fml.relauncher.FMLLaunchHandler;
public enum Mixin {
@@ -43,7 +43,7 @@ public enum Mixin {
CacheCraftingManagerRecipes(
new Builder("Cache CraftingManager recipes").addMixinClasses("minecraft.CraftingManagerMixin")
.addTargetedMod(VANILLA)
- .setApplyIf(() -> ConfigHandler.enabledPatches[3])
+ .setApplyIf(() -> Configuration.mixins.enableCraftingManagerRecipeCaching)
.setPhase(Phase.EARLY)
.setSide(Side.BOTH)),
VanillaAccessors(new Builder("Adds various accessors")
diff --git a/src/main/resources/assets/bartworks/lang/en_US.lang b/src/main/resources/assets/bartworks/lang/en_US.lang
index 30d4a0b7ab..e5c1a36027 100644
--- a/src/main/resources/assets/bartworks/lang/en_US.lang
+++ b/src/main/resources/assets/bartworks/lang/en_US.lang
@@ -11,6 +11,38 @@ GT5U.gui.text.no_imprint=Missing imprint
GT5U.gui.text.not_enough_length=Multiblock Too Short
GT5U.gui.text.wrong_sievert_exactly=§7Wrong sievert. Requires exactly: %s §7Sv
GT5U.gui.text.wrong_sievert_min=§7Wrong sievert. Requires at least: %s §7Sv
+GT5U.gui.config.general.mixins=Mixins
+GT5U.gui.config.general.crossmodinteractions=CrossMod Interactions
+GT5U.gui.config.general.multiblocks=Multiblocks
+GT5U.gui.config.general.tooltip=Tooltip
+GT5U.gui.config.general.singleblocks=Singleblocks
+GT5U.gui.config.general.pollution=Pollution
+GT5U.gui.config.general.rossruinmetas=Ross128B's Ruins MetaIDs
+GT5U.gui.config.general.rossruinmetas.highpressuresteam=High Pressure Steam
+GT5U.gui.config.general.rossruinmetas.highpressuresteam.buffers=Buffers
+GT5U.gui.config.general.rossruinmetas.highpressuresteam.cables=Cables
+GT5U.gui.config.general.rossruinmetas.highpressuresteam.generators=Generators
+GT5U.gui.config.general.rossruinmetas.highpressuresteam.machines=Machines
+GT5U.gui.config.general.rossruinmetas.lv=LV
+GT5U.gui.config.general.rossruinmetas.lv.buffers=Buffers
+GT5U.gui.config.general.rossruinmetas.lv.cables=Cables
+GT5U.gui.config.general.rossruinmetas.lv.generators=Generators
+GT5U.gui.config.general.rossruinmetas.lv.machines=Machines
+GT5U.gui.config.general.rossruinmetas.mv=MV
+GT5U.gui.config.general.rossruinmetas.mv.buffers=Buffers
+GT5U.gui.config.general.rossruinmetas.mv.cables=Cables
+GT5U.gui.config.general.rossruinmetas.mv.generators=Generators
+GT5U.gui.config.general.rossruinmetas.mv.machines=Machines
+GT5U.gui.config.general.rossruinmetas.hv=HV
+GT5U.gui.config.general.rossruinmetas.hv.buffers=Buffers
+GT5U.gui.config.general.rossruinmetas.hv.cables=Cables
+GT5U.gui.config.general.rossruinmetas.hv.generators=Generators
+GT5U.gui.config.general.rossruinmetas.hv.machines=Machines
+GT5U.gui.config.general.rossruinmetas.ev=EV
+GT5U.gui.config.general.rossruinmetas.ev.buffers=Buffers
+GT5U.gui.config.general.rossruinmetas.ev.cables=Cables
+GT5U.gui.config.general.rossruinmetas.ev.generators=Generators
+GT5U.gui.config.general.rossruinmetas.ev.machines=Machines
itemGroup.bartworks=BartWorks Inter Temporal
BW_Machinery_Casings.0.name=Nickel-Zinc Ferrite Block