diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2017-12-10 15:37:46 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2017-12-10 15:37:46 +1000 |
commit | 5a90d0ab107b4711b2b22aa3b2964ce7d669a216 (patch) | |
tree | d9ea8d2b4382f942ee08b9f52499f3bf20b6ed7f /src/Java/gtPlusPlus/core | |
parent | 27c1a066d6aaa2c3c8f3847909323c78ab693e37 (diff) | |
download | GT5-Unofficial-5a90d0ab107b4711b2b22aa3b2964ce7d669a216.tar.gz GT5-Unofficial-5a90d0ab107b4711b2b22aa3b2964ce7d669a216.tar.bz2 GT5-Unofficial-5a90d0ab107b4711b2b22aa3b2964ce7d669a216.zip |
% Major Refactor of the base GT++ class.
% Moved Config Handling to it's own class.
% Renamed configSwitches.class to ConfigSwitches.class.
+ Added framework for Segment Analytics.
Diffstat (limited to 'src/Java/gtPlusPlus/core')
25 files changed, 293 insertions, 71 deletions
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java index 10602c613e..1360932dfb 100644 --- a/src/Java/gtPlusPlus/core/common/CommonProxy.java +++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java @@ -13,7 +13,7 @@ import gtPlusPlus.core.handler.events.PickaxeBlockBreakEventHandler; import gtPlusPlus.core.handler.events.ZombieBackupSpawnEventHandler; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.recipe.RECIPES_Old_Circuits; import gtPlusPlus.core.recipe.common.CI; @@ -94,7 +94,7 @@ public class CommonProxy { //Handles Custom tooltips for EIO. Utils.registerEvent(new HandlerTooltip_EIO()); - if (configSwitches.disableZombieReinforcement){ + if (ConfigSwitches.disableZombieReinforcement){ //Make Zombie reinforcements fuck off. Utils.registerEvent(new ZombieBackupSpawnEventHandler()); } @@ -117,7 +117,7 @@ public class CommonProxy { PlayerCache.initCache(); //Circuits - if (CORE.configSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ RECIPES_Old_Circuits.handleCircuits(); new RECIPES_Old_Circuits(); } diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java index d8ff219db7..763ae3f283 100644 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java +++ b/src/Java/gtPlusPlus/core/common/compat/COMPAT_ExtraUtils.java @@ -1,6 +1,6 @@ package gtPlusPlus.core.common.compat; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.recipe.RECIPES_Tools; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.recipe.RecipeUtils; @@ -18,7 +18,7 @@ public class COMPAT_ExtraUtils { ItemUtils.getItemForOreDict("ExtraUtilities:bedrockiumIngot", "ingotBedrockium", "Bedrockium Ingot", 0); //GT_OreDictUnificator.registerOre("plateBedrockium", new ItemStack(ModItems.itemPlateBedrockium)); - if (configSwitches.enableAlternativeDivisionSigilRecipe){ + if (ConfigSwitches.enableAlternativeDivisionSigilRecipe){ //Division Sigil RecipeUtils.recipeBuilder( "plateNetherStar", "gemIridium", "plateNetherStar", diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java index ce62eaac5a..74e6d931fd 100644 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java +++ b/src/Java/gtPlusPlus/core/common/compat/COMPAT_IC2.java @@ -3,7 +3,7 @@ package gtPlusPlus.core.common.compat; import static gtPlusPlus.core.handler.COMPAT_HANDLER.RemoveRecipeQueue; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.recipe.ShapedRecipeObject; import gtPlusPlus.core.util.item.ItemUtils; @@ -37,7 +37,7 @@ public class COMPAT_IC2 { private static final void run(){ - if (configSwitches.disableIC2Recipes){ + if (ConfigSwitches.disableIC2Recipes){ diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java index a257766e38..4fcce4013d 100644 --- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java +++ b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Thaumcraft.java @@ -1,7 +1,7 @@ package gtPlusPlus.core.common.compat; import gregtech.api.util.GT_OreDictUnificator; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.item.ItemUtils; @@ -9,7 +9,7 @@ public class COMPAT_Thaumcraft { public static void OreDict(){ - if (configSwitches.enableThaumcraftShardUnification){ + if (ConfigSwitches.enableThaumcraftShardUnification){ run(); } } diff --git a/src/Java/gtPlusPlus/core/config/ConfigHandler.java b/src/Java/gtPlusPlus/core/config/ConfigHandler.java new file mode 100644 index 0000000000..96bd801ad4 --- /dev/null +++ b/src/Java/gtPlusPlus/core/config/ConfigHandler.java @@ -0,0 +1,166 @@ +package gtPlusPlus.core.config; + +import static gtPlusPlus.core.item.general.RF2EU_Battery.rfPerEU; +import static gtPlusPlus.core.lib.CORE.DARKBIOME_ID; +import static gtPlusPlus.core.lib.CORE.DEBUG; +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.*; +import static gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames; + +import java.io.File; + +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; +import net.minecraftforge.common.config.Configuration; + +public class ConfigHandler { + + public static void handleConfigFile(final FMLPreInitializationEvent event) { + final Configuration config = new Configuration( + new File(event.getModConfigurationDirectory(), "GTplusplus/GTplusplus.cfg")); + config.load(); + + ConfigSwitches.enableUpdateChecker = config.getBoolean("enableUpdateChecker", "debug", true, + "Stops mod checking for updates."); + + // Debug + DEBUG = config.getBoolean("debugMode", "debug", false, + "Enables all sorts of debug logging. (Don't use unless told to, breaks other things.)"); + disableEnderIOIntegration = config.getBoolean("disableEnderIO", "debug", false, + "Disables EnderIO Integration."); + MACHINE_INFO = config.getBoolean("enableMachineInfoLogging", "debug", false, + "Makes many machines display lots of debug logging."); + showHiddenNEIItems = config.getBoolean("showHiddenNEIItems", "debug", false, + "Makes all items hidden from NEI display."); + + + // Machines + enableThaumcraftShardUnification = config.getBoolean("enableThaumcraftShardUnification", "machines", false, + "Allows the use of TC shards across many recipes by oreDicting them into a common group."); + enableAlternativeBatteryAlloy = config.getBoolean("enableAlternativeBatteryAlloy", "machines", false, + "Adds a non-Antimony using Battery Alloy. Not Balanced at all.."); + disableIC2Recipes = config.getBoolean("disableIC2Recipes", "machines", false, + "Alkaluscraft Related - Removes IC2 Cables Except glass fibre. Few other Misc Tweaks."); + enableAlternativeDivisionSigilRecipe = config.getBoolean("enableAlternativeDivisionSigilRecipe", "machines", + false, "Utilizes Neutronium instead."); + + //Circuits + enableCustomCircuits = config.getBoolean("enableCustomCircuits", "gregtech", true, + "Adds custom circuits to expand past the Master Tier."); + enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false, + "Restores circuits and their recipes from Pre-5.09.28 times."); + + // Tools + enableSkookumChoochers = config.getBoolean("enableSkookumChoochers", "gregtech", true, + "Adds Custom GT Tools, called Skookum Choochers, functioning as a hard hammer and a wrench."); + enableMultiSizeTools = config.getBoolean("enableMultiSizeTools", "gregtech", true, + "Adds Custom GT Shovels and Pickaxes which mine in a 3x3 style. One of each whill be generated for each Gregtech Material which has Dense Plates and Long Rods available."); + + // GT-Fixes + enableNitroFix = config.getBoolean("enableNitroFix", "gregtech", false, + "Restores the old Nitro-Diesel recipes."); + + // Pipes & Cables + enableCustom_Pipes = config.getBoolean("enableCustom_Pipes", "gregtech", true, + "Adds Custom GT Fluid Pipes."); + enableCustom_Cables = config.getBoolean("enableCustom_Cables", "gregtech", true, + "Adds Custom GT Cables."); + + // Block Drops + chanceToDropDrainedShard = config.getInt("chanceToDropDrainedShard", "blockdrops", 196, 0, + 10000, "Drained shards have a 1 in X chance to drop."); + chanceToDropFluoriteOre = config.getInt("chanceToDropFluoriteOre", "blockdrops", 32, 0, + 10000, "Fluorite Ore has a 1 in X chance to drop from Limestone and a 1 in X*20 from Sandstone.."); + + // Single machines + enableMachine_SolarGenerators = config.getBoolean("enableSolarGenerators", "gregtech", + false, "These may be overpowered, Consult a local electrician."); + enableMachine_Safes = config.getBoolean("enableMachineSafes", "gregtech", true, + "These protect your goodies/rare stuff."); + enableMachine_Dehydrators = config.getBoolean("enableMachineDehydrators", "gregtech", true, + "These dehydrate stuff."); + enableMachine_SteamConverter = config.getBoolean("enableMachineSteamConverter", "gregtech", + true, "Converts IC2 steam -> Railcraft steam."); + enableMachine_FluidTanks = config.getBoolean("enableMachineFluidTanks", "gregtech", true, + "Portable fluid tanks."); + enableMachine_RocketEngines = config.getBoolean("enableMachineRocketEngines", "gregtech", + true, "Diesel egines with different internals, they consume less fuel overall."); + enableMachine_GeothermalEngines = config.getBoolean("enableMachineGeothermalEngines", + "gregtech", true, "These may be overpowered, Consult a local geologist."); + enableMachine_WorldAccelerators = config.getBoolean("enableMachineWorldAccelerators", + "gregtech", true, "These allow boosting Block/TileEntity Tick times [OP]."); + enableMachine_Tesseracts = config.getBoolean("enableMachineTesseracts", + "gregtech", true, "Tesseracts for wireless item/fluid movement."); + enableMachine_SimpleWasher = config.getBoolean("enableMachineSimpleWasher", + "gregtech", true, "Very basic automated cauldron for dust washing."); + enableMachine_Pollution = config.getBoolean("enableMachinePollution", + "gregtech", true, "Pollution Detector & Scrubbers."); + + // Multi machines + enableMultiblock_AlloyBlastSmelter = config.getBoolean("enableMultiblockAlloyBlastSmelter", + "gregtech", true, + "Required to smelt most high tier materials from GT++. Also smelts everything else to molten metal."); + enableMultiblock_IndustrialCentrifuge = config + .getBoolean("enableMultiblockIndustrialCentrifuge", "gregtech", true, "Spin, Spin, Spiiiin."); + enableMultiblock_IndustrialCokeOven = config.getBoolean( + "enableMultiblockIndustrialCokeOven", "gregtech", true, + "Pyro Oven Alternative, older, more realistic, better."); + enableMultiblock_IndustrialElectrolyzer = config.getBoolean( + "enableMultiblockIndustrialElectrolyzer", "gregtech", true, + "Electrolyzes things with extra bling factor."); + enableMultiblock_IndustrialMacerationStack = config.getBoolean( + "enableMultiblockIndustrialMacerationStack", "gregtech", true, + "A hyper efficient maceration tower, nets more bonus outputs."); + enableMultiblock_IndustrialPlatePress = config.getBoolean( + "enableMultiblockIndustrialPlatePress", "gregtech", true, "Industrial bendering machine thingo."); + enableMultiblock_IndustrialWireMill = config.getBoolean( + "enableMultiblockIndustrialWireMill", "gregtech", true, "Produces fine wire and exotic cables."); + enableMultiblock_IronBlastFurnace = config.getBoolean("enableMultiblockIronBlastFurnace", + "gregtech", true, "Skip the Bronze age, very slowly."); + enableMultiblock_MatterFabricator = config.getBoolean("enableMultiblockMatterFabricator", + "gregtech", true, "?FAB?RIC?ATE MA?TT?ER."); + enableMultiblock_MultiTank = config.getBoolean("enableMultiblockMultiTank", "gregtech", + true, "Tall tanks, each layer adds extra fluid storage."); + enableMultiblock_PowerSubstation = config.getBoolean("enableMultiblockPowerSubstation", + "gregtech", true, "For managing large power grids."); + enableMultiblock_LiquidFluorideThoriumReactor = config.getBoolean( + "enableMultiblockLiquidFluorideThoriumReactor", "gregtech", true, "For supplying large power grids."); + enableMultiblock_NuclearFuelRefinery = config.getBoolean( + "enableMultiblock_NuclearFuelRefinery", "gregtech", true, + "Refines molten chemicals into nuclear fuels."); + enableMultiblock_IndustrialSifter = config.getBoolean("enableMultiblock_IndustrialSifter", + "gregtech", true, "Large scale sifting."); + enableMultiblock_LargeAutoCrafter = config.getBoolean("enableMultiblock_LargeAutoCrafter", + "gregtech", true, "Can Assemble, Disassemble and Craft Project data from Data Sticks."); + enableMultiblock_IndustrialThermalCentrifuge = config.getBoolean("enableMultiblock_IndustrialThermalCentrifuge", + "gregtech", true, "Your warm spin for the ore thing."); + enableMultiblock_IndustrialWashPlant = config.getBoolean("enableMultiblock_IndustrialWashPlant", + "gregtech", true, "Used to wash the dirt, riiiiight offff.."); + enableMultiblock_ThermalBoiler = config.getBoolean("enableMachineThermalBoiler", + "gregtech", true, "Thermal Boiler from GT4. Can Filter Lava for resources."); + enableMultiblock_IndustrialCuttingMachine = config.getBoolean("enableMultiblock_IndustrialCuttingMachine", + "gregtech", true, "Very fast and efficient Cutting Machine."); + + // Options + rfPerEU = config.getInt("rfUsedPerEUForUniversalBatteries", "configurables", 4, 1, 1000, + "How much RF is a single unit of EU worth? (Most mods use 4:1 ratio)"); + + // Features + enableCustomCapes = config.getBoolean("enableSupporterCape", "features", true, + "Enables Custom GT++ Cape."); + disableZombieReinforcement = config.getBoolean("disableZombieReinforcement", "features", false, + "Disables Zombie Reinforcement on hard difficutly."); + + //Biomes + DARKBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension."); + + //Blacklisted Accelerator TileEntities + BlacklistedTileEntiyClassNames = new String[] { "com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry" }; + BlacklistedTileEntiyClassNames = config.getStringList( + "BlacklistedTileEntiyClassNames", "gregtech", + BlacklistedTileEntiyClassNames, + "The Canonical Class-Names of TileEntities that should be ignored by the WorldAccelerator"); + + config.save(); + } + +} diff --git a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java b/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java new file mode 100644 index 0000000000..1c023b7304 --- /dev/null +++ b/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java @@ -0,0 +1,50 @@ +package gtPlusPlus.core.handler; + +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableOldGTcircuits; + +import java.lang.reflect.Field; +import java.util.HashSet; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import gregtech.api.enums.GT_Values; +import gregtech.api.util.EmptyRecipeMap; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; + +public class OldCircuitHandler { + + public static void preInit(){ + if (enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + removeCircuitRecipeMap(); //Bye shitty recipes. + } + } + + public static void init(){ + + } + + public static void postInit(){ + + } + + private static boolean removeCircuitRecipeMap(){ + try { + Utils.LOG_INFO("[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added."); + ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); + Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"); + FieldUtils.removeFinalModifier(jaffar, true); + jaffar.set(null, new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); + Utils.LOG_INFO("[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes."); + } + catch (Exception e) { + Utils.LOG_INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map."); + return false; + } + return true; + } + +} diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java index 372527cdb2..16599b3b8b 100644 --- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java @@ -1,7 +1,7 @@ package gtPlusPlus.core.handler.events; -import static gtPlusPlus.core.lib.CORE.configSwitches.chanceToDropDrainedShard; -import static gtPlusPlus.core.lib.CORE.configSwitches.chanceToDropFluoriteOre; +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropDrainedShard; +import static gtPlusPlus.core.lib.CORE.ConfigSwitches.chanceToDropFluoriteOre; import java.util.ArrayList; import java.util.Random; diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java index eac8757b0e..1096816690 100644 --- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java +++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java @@ -39,7 +39,7 @@ public class LoginEventHandler { if (!this.localPlayerRef.worldObj.isRemote){ PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString()); - if (CORE.configSwitches.enableUpdateChecker){ + if (CORE.ConfigSwitches.enableUpdateChecker){ if (!Utils.isModUpToDate()){ Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating."); if (!CORE.MASTER_VERSION.toLowerCase().equals("offline")) { diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index c6593ea82e..bdb1837aa1 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -54,7 +54,7 @@ import gtPlusPlus.core.item.tool.staballoy.MultiSpadeBase; import gtPlusPlus.core.item.tool.staballoy.StaballoyAxe; import gtPlusPlus.core.item.tool.staballoy.StaballoyPickaxe; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.material.ELEMENT; @@ -573,7 +573,7 @@ public final class ModItems { //Load Tree Farmer - if (CORE.configSwitches.enableMultiblock_TreeFarmer){ //https://en.wikipedia.org/wiki/UAN + if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ //https://en.wikipedia.org/wiki/UAN dustFertUN18 = ItemUtils.generateSpecialUseDusts("UN18Fertiliser", "UN-18 Fertiliser", Utils.rgbtoHexValue(60, 155, 60))[0]; dustFertUN32 = ItemUtils.generateSpecialUseDusts("UN32Fertiliser", "UN-32 Fertiliser", Utils.rgbtoHexValue(55, 190, 55))[0]; @@ -645,10 +645,10 @@ public final class ModItems { } //A plate of Europium. - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.configSwitches.enableCustom_Pipes){ + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ itemPlateEuropium = new BaseItemPlate(MaterialUtils.generateMaterialFromGtENUM(Materials.Europium)); } - if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.configSwitches.enableCustom_Pipes){ + if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){ itemDoublePlateEuropium = new BaseItemPlateDouble(MaterialUtils.generateMaterialFromGtENUM(Materials.Europium)); } @@ -801,7 +801,7 @@ public final class ModItems { //Special Item Handling Case - if (configSwitches.enableAlternativeBatteryAlloy) { + if (ConfigSwitches.enableAlternativeBatteryAlloy) { //ModItems.itemIngotBatteryAlloy = new BaseItemIngot("itemIngotBatteryAlloy", "Battery Alloy", new short[]{35, 228, 141}, 0); TODO ModItems.itemPlateBatteryAlloy = ItemUtils.generateSpecialUsePlate("BatteryAlloy", "Battery Alloy", new short[]{35, 228, 141}, 0); diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index 80b48913d5..235d50ae36 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -59,7 +59,7 @@ public class BaseItemComponent extends Item{ } public String getCorrectTextures(){ - if (!CORE.configSwitches.useGregtechTextures){ + if (!CORE.ConfigSwitches.useGregtechTextures){ return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME; } if (this.componentType == ComponentTypes.GEAR){ diff --git a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java index f5fff65882..f2228afb78 100644 --- a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java +++ b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java @@ -48,7 +48,7 @@ public class BaseItemCell extends BaseItemComponent{ @Override public void registerIcons(final IIconRegister i) { - if (CORE.configSwitches.useGregtechTextures){ + if (CORE.ConfigSwitches.useGregtechTextures){ this.base = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "cell"); this.overlay = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "cell_OVERLAY"); } @@ -64,10 +64,10 @@ public class BaseItemCell extends BaseItemComponent{ @Override public int getColorFromItemStack(final ItemStack stack, final int renderPass) { - if (renderPass == 0 && !CORE.configSwitches.useGregtechTextures){ + if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){ return Utils.rgbtoHexValue(230, 230, 230); } - if (renderPass == 1 && CORE.configSwitches.useGregtechTextures){ + if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){ return Utils.rgbtoHexValue(230, 230, 230); } return this.componentColour; diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java index d22e606e78..6aa1f54cc8 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java @@ -78,7 +78,7 @@ public class BaseItemDust extends Item{ } private String getCorrectTexture(final String pileSize){ - if (!CORE.configSwitches.useGregtechTextures){ + if (!CORE.ConfigSwitches.useGregtechTextures){ if ((pileSize == "dust") || (pileSize == "Dust")){ this.setTextureName(CORE.MODID + ":" + "dust");} else{ diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java index 93fc833c79..f19aaff4b3 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java @@ -85,7 +85,7 @@ public class BaseItemDustUnique extends Item{ } private String getCorrectTexture(final String pileSize){ - if (!CORE.configSwitches.useGregtechTextures){ + if (!CORE.ConfigSwitches.useGregtechTextures){ if ((pileSize == "dust") || (pileSize == "Dust")){ this.setTextureName(CORE.MODID + ":" + "dust");} else{ diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java index cd30fdd165..b6f139b74a 100644 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java +++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java @@ -65,7 +65,7 @@ public class BaseItemIngotHot extends BaseItemIngot{ @Override @SideOnly(Side.CLIENT) public boolean requiresMultipleRenderPasses(){ - if (CORE.configSwitches.useGregtechTextures){ + if (CORE.ConfigSwitches.useGregtechTextures){ return true; } else { @@ -76,7 +76,7 @@ public class BaseItemIngotHot extends BaseItemIngot{ @Override public void registerIcons(final IIconRegister i) { - if (CORE.configSwitches.useGregtechTextures){ + if (CORE.ConfigSwitches.useGregtechTextures){ this.base = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot"); this.overlay = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot_OVERLAY"); } @@ -89,10 +89,10 @@ public class BaseItemIngotHot extends BaseItemIngot{ @Override public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) { - if(pass == 0 && CORE.configSwitches.useGregtechTextures) { + if(pass == 0 && CORE.ConfigSwitches.useGregtechTextures) { return this.base; } - else if(pass == 1 && CORE.configSwitches.useGregtechTextures) { + else if(pass == 1 && CORE.ConfigSwitches.useGregtechTextures) { return this.overlay; } else { diff --git a/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java b/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java index 2c6479fbd4..cc73ba3d32 100644 --- a/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java +++ b/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java @@ -19,7 +19,7 @@ public class ItemsMultiTools { //Load Multitools final boolean gtStyleTools = LoadedMods.Gregtech; - if (CORE.configSwitches.enableMultiSizeTools){ + if (CORE.ConfigSwitches.enableMultiSizeTools){ //GT Materials final Materials[] rm = Materials.values(); diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java index cd6aacd3a8..f9959f6d57 100644 --- a/src/Java/gtPlusPlus/core/lib/CORE.java +++ b/src/Java/gtPlusPlus/core/lib/CORE.java @@ -11,6 +11,7 @@ import java.util.concurrent.ConcurrentHashMap; import com.mojang.authlib.GameProfile; import gregtech.api.GregTech_API; +import gtPlusPlus.api.analytics.SegmentAnalytics; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.array.Pair; import gtPlusPlus.core.util.geo.GeoUtils; @@ -28,6 +29,11 @@ import net.minecraftforge.common.config.Configuration; public class CORE { + //Analytics handler + public static SegmentAnalytics mAnalytics; + + + protected CORE(){ //import cpw.mods.fml.common.Optional; } @@ -105,7 +111,7 @@ public class CORE { //public static final Materials2[] MiscGeneratedMaterials = new Materials2[1000]; - public static class configSwitches { + public static class ConfigSwitches { //Updates public static boolean enableUpdateChecker = true; diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java index dda50a0d84..632c9d235f 100644 --- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java +++ b/src/Java/gtPlusPlus/core/lib/LoadedMods.java @@ -3,7 +3,7 @@ package gtPlusPlus.core.lib; import static gtPlusPlus.core.lib.CORE.GTNH; import cpw.mods.fml.common.Loader; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechTextures; import gtPlusPlus.xmod.gregtech.recipes.GregtechRecipeAdder; @@ -90,7 +90,7 @@ public class LoadedMods { Utils.LOG_INFO("Components enabled for: BuildCraft"); totalMods++; } - if ((Loader.isModLoaded("EnderIO") == true) && !configSwitches.disableEnderIOIntegration){ + if ((Loader.isModLoaded("EnderIO") == true) && !ConfigSwitches.disableEnderIOIntegration){ EnderIO = true; Utils.LOG_INFO("Components enabled for: EnderIO"); totalMods++; diff --git a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java index 4a9584466a..448188379a 100644 --- a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java +++ b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java @@ -22,7 +22,7 @@ import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion; import gtPlusPlus.core.entity.projectile.EntityToxinballSmall; import gtPlusPlus.core.handler.render.FirepitRender; import gtPlusPlus.core.item.ModItems; -import gtPlusPlus.core.lib.CORE.configSwitches; +import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.tileentities.general.TileEntityFirepit; import gtPlusPlus.core.util.Utils; @@ -44,7 +44,7 @@ public class ClientProxy extends CommonProxy implements Runnable{ @SubscribeEvent public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) { - if (configSwitches.enableCustomCapes){ + if (ConfigSwitches.enableCustomCapes){ mCapeRenderer.receiveRenderSpecialsEvent(aEvent); } } @@ -55,7 +55,7 @@ public class ClientProxy extends CommonProxy implements Runnable{ @Override public void preInit(final FMLPreInitializationEvent e) { super.preInit(e); - if (configSwitches.enableCustomCapes){ + if (ConfigSwitches.enableCustomCapes){ onPreLoad(); } //Do this weird things for textures. @@ -153,7 +153,7 @@ public class ClientProxy extends CommonProxy implements Runnable{ public void onPreLoad() { - if (configSwitches.enableCustomCapes){ + if (ConfigSwitches.enableCustomCapes){ String arr$[] = { "draknyte1", "fobius" }; @@ -168,7 +168,7 @@ public class ClientProxy extends CommonProxy implements Runnable{ public void run() { try { - if (configSwitches.enableCustomCapes){ + if (ConfigSwitches.enableCustomCapes){ Utils.LOG_INFO("GT++ Mod: Downloading Cape List."); @SuppressWarnings("resource") Scanner tScanner = new Scanner(new URL("https://github.com/draknyte1/GTplusplus/blob/master/SupporterList.txt").openStream()); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index c74603abc1..a333af99e7 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -1060,7 +1060,7 @@ public class RECIPES_GREGTECH { private static void benderRecipes(){ - if (CORE.configSwitches.enableMultiblock_PowerSubstation){ + if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation){ GT_Values.RA.addBenderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("ingotVanadium", 1), ItemUtils.getItemStackOfAmountFromOreDict("plateVanadium", 1), 8, 16); } } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java index 1a9ae86c52..4f5cfd74e6 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java @@ -19,7 +19,7 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator { public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) { if (aOreDictName.equals(OreDictNames.craftingLensBlue.toString())) { - if (CORE.configSwitches.enableCustomCircuits && !CORE.GTNH){ + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilYttriumBariumCuprate", 1) != null){ GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.YttriumBariumCuprate, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480); } @@ -45,7 +45,7 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator { } else if (aOreDictName.equals(OreDictNames.craftingLensYellow.toString())) { - if (CORE.configSwitches.enableCustomCircuits && !CORE.GTNH){ + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilOsmium", 1) != null){ GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_LuV.get(1L, new Object[0]), 64, 1024); } @@ -58,7 +58,7 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator { } else if (aOreDictName.equals(OreDictNames.craftingLensCyan.toString())) { } else if (aOreDictName.equals(OreDictNames.craftingLensRed.toString())) { } else if (aOreDictName.equals(OreDictNames.craftingLensGreen.toString())) { - if (CORE.configSwitches.enableCustomCircuits && !CORE.GTNH){ + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilNaquadah", 1) != null){ GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadah, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(1L, new Object[0]), 64, 2000); } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java index c644163331..14921c645e 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java @@ -382,7 +382,7 @@ public class RECIPES_MachineComponents { } private static void GregtechMachinePhase(){ - if (CORE.configSwitches.enableCustomCircuits && !CORE.GTNH){ + if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){ Utils.LOG_INFO("Adding Gregtech machine recipes for the circuits."); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_IV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_IV.get(1L, new Object[0]), 32, 256); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_LuV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_LuV.get(1L, new Object[0]), 64, 512); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 60fa118b1d..9e408ff7d4 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -214,7 +214,7 @@ public class RECIPES_Machines { } - if (CORE.configSwitches.enableMultiblock_IndustrialCokeOven){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven){ if(LoadedMods.Railcraft){ //Misc INPUT_RCCokeOvenBlock = ItemUtils.getItemStackWithMeta(LoadedMods.Railcraft, "Railcraft:machine.alpha", "Coke_Oven_RC", 7, 1); @@ -367,7 +367,7 @@ public class RECIPES_Machines { RECIPE_Buffer_MAX); //Steam Condenser - if (CORE.configSwitches.enableMachine_SteamConverter ){ + if (CORE.ConfigSwitches.enableMachine_SteamConverter ){ RECIPE_SteamCondenser = GregtechItemList.Condensor_MAX.get(1); RecipeUtils.addShapedGregtechRecipe( pipeLargeCopper, pipeHugeSteel, pipeLargeCopper, @@ -377,7 +377,7 @@ public class RECIPES_Machines { } - if (CORE.configSwitches.enableMultiblock_IronBlastFurnace){ + if (CORE.ConfigSwitches.enableMultiblock_IronBlastFurnace){ RECIPE_IronBlastFurnace = GregtechItemList.Machine_Iron_BlastFurnace.get(1); RECIPE_IronPlatedBricks = GregtechItemList.Casing_IronPlatedBricks.get(Casing_Amount); @@ -405,7 +405,7 @@ public class RECIPES_Machines { GT_Values.RA.addArcFurnaceRecipe(RECIPE_IronPlatedBricks, new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotWroughtIron", 6), ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustAsh", 2)}, new int[]{0}, 32*20, 32); } - if (CORE.configSwitches.enableMultiblock_IndustrialCentrifuge){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCentrifuge){ //Industrial Centrifuge RECIPE_IndustrialCentrifugeController = GregtechItemList.Industrial_Centrifuge.get(1); RECIPE_IndustrialCentrifugeCasing = GregtechItemList.Casing_Centrifuge1.get(Casing_Amount); @@ -424,7 +424,7 @@ public class RECIPES_Machines { RECIPE_IndustrialCentrifugeCasing); } - if (CORE.configSwitches.enableMultiblock_IndustrialCokeOven){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven){ //Industrial Coke Oven RECIPE_IndustrialCokeOvenController = GregtechItemList.Industrial_CokeOven.get(1); RECIPE_IndustrialCokeOvenFrame = GregtechItemList.Casing_CokeOven.get(Casing_Amount); @@ -467,7 +467,7 @@ public class RECIPES_Machines { RECIPE_IndustrialCokeOvenCasingB); } - if (CORE.configSwitches.enableMultiblock_IndustrialElectrolyzer){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialElectrolyzer){ //Industrial Electrolyzer RECIPE_IndustrialElectrolyzerController = GregtechItemList.Industrial_Electrolyzer.get(1); RECIPE_IndustrialElectrolyzerFrame = GregtechItemList.Casing_Electrolyzer.get(Casing_Amount); @@ -486,7 +486,7 @@ public class RECIPES_Machines { RECIPE_IndustrialElectrolyzerController); } - if (CORE.configSwitches.enableMultiblock_IndustrialPlatePress){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress){ //Industrial Material Press RECIPE_IndustrialMaterialPressController = GregtechItemList.Industrial_PlatePress.get(1); RECIPE_IndustrialMaterialPressFrame = GregtechItemList.Casing_MaterialPress.get(Casing_Amount); @@ -505,7 +505,7 @@ public class RECIPES_Machines { RECIPE_IndustrialMaterialPressController); } - if (CORE.configSwitches.enableMultiblock_IndustrialMacerationStack){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialMacerationStack){ //Industrial Maceration Stack RECIPE_IndustrialMacerationStackController = GregtechItemList.Industrial_MacerationStack.get(1); RECIPE_IndustrialMacerationStackFrame = GregtechItemList.Casing_MacerationStack.get(Casing_Amount); @@ -524,7 +524,7 @@ public class RECIPES_Machines { RECIPE_IndustrialMacerationStackController); } - if (CORE.configSwitches.enableMultiblock_IndustrialWireMill){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialWireMill){ //Industrial Wire Factory RECIPE_IndustrialWireFactoryController = GregtechItemList.Industrial_WireFactory.get(1); RECIPE_IndustrialWireFactoryFrame = GregtechItemList.Casing_WireFactory.get(Casing_Amount); @@ -546,7 +546,7 @@ public class RECIPES_Machines { //Tiered Tanks - if (CORE.configSwitches.enableMachine_FluidTanks){ + if (CORE.ConfigSwitches.enableMachine_FluidTanks){ Utils.LOG_WARNING("Is New Horizons Loaded? "+CORE.GTNH); if (!CORE.GTNH){ RecipeUtils.addShapedGregtechRecipe( @@ -640,7 +640,7 @@ public class RECIPES_Machines { } } - if (CORE.configSwitches.enableMultiblock_MultiTank){ + if (CORE.ConfigSwitches.enableMultiblock_MultiTank){ //Industrial Multi Tank RECIPE_IndustrialMultiTankController = GregtechItemList.Industrial_MultiTank.get(1); RECIPE_IndustrialMultiTankFrame = GregtechItemList.Casing_MultitankExterior.get(Casing_Amount); @@ -680,7 +680,7 @@ public class RECIPES_Machines { mSemiFluidgen, Character.valueOf('G'), OrePrefixes.gearGt.get(Materials.StainlessSteel) }); - if (CORE.configSwitches.enableMultiblock_AlloyBlastSmelter){ + if (CORE.ConfigSwitches.enableMultiblock_AlloyBlastSmelter){ //Industrial Blast Smelter RECIPE_IndustrialBlastSmelterController = GregtechItemList.Industrial_AlloyBlastSmelter.get(1); RECIPE_IndustrialBlastSmelterFrame = GregtechItemList.Casing_BlastSmelter.get(Casing_Amount); @@ -706,7 +706,7 @@ public class RECIPES_Machines { RECIPE_IndustrialBlastSmelterCoil); } - if (CORE.configSwitches.enableMultiblock_MatterFabricator){ + if (CORE.ConfigSwitches.enableMultiblock_MatterFabricator){ //Industrial Matter Fabricator RECIPE_IndustrialMatterFabController = GregtechItemList.Industrial_MassFab.get(1); RECIPE_IndustrialMatterFabFrame = GregtechItemList.Casing_MatterFab.get(Casing_Amount); @@ -732,7 +732,7 @@ public class RECIPES_Machines { RECIPE_IndustrialMatterFabCoil); } - if (CORE.configSwitches.enableMultiblock_IndustrialSifter){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter){ //Industrial Sieve RECIPE_IndustrialSieveController = GregtechItemList.Industrial_Sifter.get(1); RECIPE_IndustrialSieveFrame = GregtechItemList.Casing_Sifter.get(Casing_Amount); @@ -758,7 +758,7 @@ public class RECIPES_Machines { RECIPE_IndustrialSieveGrate); } - if (CORE.configSwitches.enableMultiblock_TreeFarmer){ + if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ //Industrial Tree Farmer RECIPE_TreeFarmController = GregtechItemList.Industrial_TreeFarm.get(1); RECIPE_TreeFarmFrame = GregtechItemList.TreeFarmer_Structural.get(Casing_Amount); @@ -776,7 +776,7 @@ public class RECIPES_Machines { RECIPE_TreeFarmFrame); } - if (CORE.configSwitches.enableMachine_Tesseracts){ + if (CORE.ConfigSwitches.enableMachine_Tesseracts){ //Tesseracts RECIPE_TesseractGenerator = GregtechItemList.GT4_Tesseract_Generator.get(1); RECIPE_TesseractTerminal = GregtechItemList.GT4_Tesseract_Terminal.get(1); @@ -794,10 +794,10 @@ public class RECIPES_Machines { RECIPE_TesseractTerminal); } - if (CORE.configSwitches.enableMachine_SimpleWasher){ + if (CORE.ConfigSwitches.enableMachine_SimpleWasher){ ItemStack plateWrought = ItemUtils.getItemStackOfAmountFromOreDict("plateWroughtIron", 1); ItemStack washerPipe; - if (CORE.configSwitches.enableCustom_Pipes){ + if (CORE.ConfigSwitches.enableCustom_Pipes){ washerPipe = ItemUtils.getItemStackOfAmountFromOreDict("pipeLargeClay", 1); } else { @@ -811,7 +811,7 @@ public class RECIPES_Machines { GregtechItemList.SimpleDustWasher.get(1)); } - if (CORE.configSwitches.enableMachine_Pollution && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + if (CORE.ConfigSwitches.enableMachine_Pollution && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ RecipeUtils.addShapedGregtechRecipe( "plateCarbon", "plateCarbon", "plateCarbon", "dustCarbon", "dustCarbon", "dustCarbon", @@ -895,7 +895,7 @@ public class RECIPES_Machines { } - if (CORE.configSwitches.enableMultiblock_ThermalBoiler){ + if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){ RECIPE_ThermalBoilerController = GregtechItemList.GT4_Thermal_Boiler.get(1); RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(4); ItemStack centrifugeHV = ItemList.Machine_HV_Centrifuge.get(1); @@ -922,7 +922,7 @@ public class RECIPES_Machines { GT_Values.RA.addAssemblerRecipe(ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemPartCarbonMesh", "RawCarbonMesh", 0, 16), CI.getNumberedCircuit(18), ItemUtils.getSimpleStack(ModItems.itemLavaFilter), 80*20, 16); } - if (CORE.configSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ + if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ //Thorium Reactor RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1); @@ -963,7 +963,7 @@ public class RECIPES_Machines { ItemStack mInnerTank; - if (CORE.GTNH || !CORE.configSwitches.enableMachine_FluidTanks){ + if (CORE.GTNH || !CORE.ConfigSwitches.enableMachine_FluidTanks){ mInnerTank = ItemList.Quantum_Tank_LV.get(1); } else { @@ -1001,7 +1001,7 @@ public class RECIPES_Machines { } - if (CORE.configSwitches.enableMultiblock_PowerSubstation){ + if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation){ RecipeUtils.recipeBuilder( null, "plateIncoloy020", null, "plateIncoloy020", "frameGtIncoloyMA956", "plateIncoloy020", @@ -1015,7 +1015,7 @@ public class RECIPES_Machines { GregtechItemList.PowerSubStation.get(1)); } - if (CORE.configSwitches.enableMultiblock_IndustrialThermalCentrifuge){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialThermalCentrifuge){ RecipeUtils.recipeBuilder( "plateRedSteel", CI.craftingToolHammer_Hard, "plateRedSteel", "plateRedSteel", "frameGtBlackSteel", "plateRedSteel", @@ -1029,7 +1029,7 @@ public class RECIPES_Machines { GregtechItemList.Industrial_ThermalCentrifuge.get(1)); } - if (CORE.configSwitches.enableMultiblock_IndustrialWashPlant){ + if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant){ RecipeUtils.recipeBuilder( "plateGrisium", CI.craftingToolHammer_Hard, "plateGrisium", "plateTalonite", "frameGtGrisium", "plateTalonite", @@ -1043,7 +1043,7 @@ public class RECIPES_Machines { GregtechItemList.Industrial_WashPlant.get(1)); } - if (CORE.configSwitches.enableMultiblock_LargeAutoCrafter){ + if (CORE.ConfigSwitches.enableMultiblock_LargeAutoCrafter){ RecipeUtils.recipeBuilder( "plateStainlessSteel", CI.craftingToolHammer_Hard, "plateStainlessSteel", "plateStellite", "frameGtStainlessSteel", "plateStellite", diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java index f4be860e36..446f1a1414 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java @@ -274,7 +274,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator { private static boolean hideCircuitsNEI(){ Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems"); - if (isNEILoaded && !CORE.configSwitches.showHiddenNEIItems){ + if (isNEILoaded && !CORE.ConfigSwitches.showHiddenNEIItems){ Utils.LOG_INFO("[Old Feature - Circuits] Hiding .28+ circuits in NEI."); String[] CircuitToHide = { "Circuit_Board_Basic", diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java index 1ac0f61c84..2d857ca25a 100644 --- a/src/Java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java @@ -255,7 +255,7 @@ public class CI { } public static Object getTieredCircuit(int tier){ - if (CORE.configSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ if (tier == 0){ return GregtechItemList.Old_Circuit_Primitive.get(1); } @@ -405,7 +405,7 @@ public class CI { } public static ItemStack getDataOrb(){ - if (CORE.configSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + if (CORE.ConfigSwitches.enableOldGTcircuits && CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ return GregtechItemList.Old_Tool_DataOrb.get(1); } else { diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 0fd90953ff..05c038f835 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -204,7 +204,7 @@ public class Utils { } - if (CORE.configSwitches.MACHINE_INFO || localPlayer) { + if (CORE.ConfigSwitches.MACHINE_INFO || localPlayer) { final String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2); modLogger.info("Machine Info: " + s + " | " + name1); } |