From bb9da48b9975cb27e3b7c538bff2853a34b36fcd Mon Sep 17 00:00:00 2001 From: miozune Date: Sun, 5 Feb 2023 01:40:43 +0900 Subject: Remove redundant flags (#529) * Remove CORE.GTNH * Remove LoadedMods.Gregtech * Remove LoadedMods.IndustrialCraft2 * Remove LoadedMods.MiscUtils * Remove CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK * clean * Remove mention to GT versions * Fix assembler mode --- .../xmod/bop/blocks/BOP_Block_Registrator.java | 26 - .../java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java | 2 +- .../xmod/forestry/bees/items/FR_ItemRegistry.java | 16 +- .../forestry/bees/recipe/FR_Gregtech_Recipes.java | 23 +- .../java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java | 15 +- .../GT_MetaTileEntity_Hatch_DynamoBuffer.java | 15 +- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 43 +- .../GregtechMetaPipeEntity_Cable.java | 83 +-- .../base/GregtechMetaPipeEntityBase_Cable.java | 43 +- .../base/GregtechMeta_MultiBlockBase.java | 46 +- .../api/world/GTPP_Worldgen_GT_Ore_Layer.java | 17 +- .../xmod/gregtech/common/Meta_GT_Proxy.java | 50 +- .../xmod/gregtech/common/StaticFields59.java | 26 +- .../common/blocks/fluid/GregtechFluidHandler.java | 180 +++--- .../common/covers/GTPP_Cover_Overflow_Item.java | 10 +- .../common/items/MetaGeneratedGregtechItems.java | 624 +-------------------- .../GT_MetaTileEntity_TesseractGenerator.java | 9 +- .../GT_MetaTileEntity_TesseractTerminal.java | 9 +- .../generators/GT_MetaTileEntity_RfConvertor.java | 2 +- .../basic/GregtechMetaGarbageCollector.java | 2 +- .../GregtechMetaTileEntity_IronBlastFurnace.java | 23 +- .../multi/production/GT4Entity_AutoCrafter.java | 93 +-- ...chMetaTileEntity_BedrockMiningPlatformBase.java | 4 +- .../xmod/gregtech/loaders/GT_Material_Loader.java | 13 +- .../loaders/RecipeGen_BlastSmelterGT_Ex.java | 13 +- .../loaders/RecipeGen_BlastSmelterGT_GTNH.java | 9 +- .../xmod/gregtech/loaders/RecipeGen_Fluids.java | 258 +++++---- .../xmod/gregtech/loaders/RecipeGen_Recycling.java | 8 - .../gregtech/loaders/RecipeGen_ShapedCrafting.java | 46 +- .../loaders/recipe/RecipeLoader_Nuclear.java | 172 ++---- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 428 ++++---------- .../registration/gregtech/Gregtech4Content.java | 23 +- .../gregtech/GregtechAdvancedBoilers.java | 7 +- .../gregtech/GregtechAlgaeContent.java | 7 +- .../gregtech/GregtechAmazonWarehouse.java | 6 +- .../gregtech/GregtechComponentAssembler.java | 7 - .../registration/gregtech/GregtechConduits.java | 304 +++++----- .../gregtech/GregtechCustomHatches.java | 14 +- .../registration/gregtech/GregtechCyclotron.java | 6 +- .../registration/gregtech/GregtechDehydrator.java | 9 +- .../gregtech/GregtechEnergyBuffer.java | 6 +- .../GregtechGeothermalThermalGenerator.java | 9 +- .../gregtech/GregtechHiAmpTransformer.java | 232 +++----- .../gregtech/GregtechIndustrialAlloySmelter.java | 6 +- .../gregtech/GregtechIndustrialArcFurnace.java | 6 +- .../gregtech/GregtechIndustrialBlastSmelter.java | 8 +- .../gregtech/GregtechIndustrialCentrifuge.java | 8 +- .../gregtech/GregtechIndustrialCokeOven.java | 8 +- .../gregtech/GregtechIndustrialCuttingFactory.java | 8 +- .../gregtech/GregtechIndustrialElectrolyzer.java | 8 +- .../gregtech/GregtechIndustrialExtruder.java | 8 +- .../gregtech/GregtechIndustrialFishPond.java | 8 +- .../gregtech/GregtechIndustrialFluidHeater.java | 6 +- .../gregtech/GregtechIndustrialForgeHammer.java | 6 +- .../gregtech/GregtechIndustrialFuelRefinery.java | 8 +- .../gregtech/GregtechIndustrialGeneratorArray.java | 10 +- .../gregtech/GregtechIndustrialMacerator.java | 8 +- .../gregtech/GregtechIndustrialMassFabricator.java | 93 +-- .../gregtech/GregtechIndustrialMixer.java | 8 +- .../gregtech/GregtechIndustrialMultiMachine.java | 8 +- .../gregtech/GregtechIndustrialPlatePress.java | 8 +- .../gregtech/GregtechIndustrialSifter.java | 8 +- .../GregtechIndustrialThermalCentrifuge.java | 8 +- .../gregtech/GregtechIndustrialTreeFarm.java | 8 +- .../gregtech/GregtechIndustrialWashPlant.java | 8 +- .../gregtech/GregtechIndustrialWiremill.java | 8 +- .../gregtech/GregtechIronBlastFurnace.java | 8 +- .../registration/gregtech/GregtechLFTR.java | 8 +- .../GregtechLargeTurbinesAndHeatExchanger.java | 6 +- .../gregtech/GregtechMolecularTransformer.java | 6 +- .../gregtech/GregtechNitroDieselFix.java | 390 +++++++------ .../gregtech/GregtechPollutionDevices.java | 8 +- .../gregtech/GregtechPowerBreakers.java | 6 +- .../gregtech/GregtechPowerSubStation.java | 8 +- .../gregtech/GregtechQuantumForceTransformer.java | 16 +- .../registration/gregtech/GregtechRTG.java | 6 +- .../gregtech/GregtechRocketFuelGenerator.java | 112 ++-- .../registration/gregtech/GregtechSafeBlock.java | 8 +- .../gregtech/GregtechSimpleWasher.java | 11 +- .../gregtech/GregtechSolarGenerators.java | 3 +- .../registration/gregtech/GregtechSolarTower.java | 6 +- .../gregtech/GregtechSteamCondenser.java | 8 +- .../registration/gregtech/GregtechSuperChests.java | 64 +-- .../gregtech/GregtechSuperConductionPoint.java | 18 - .../gregtech/GregtechThaumcraftDevices.java | 2 +- .../gregtech/GregtechTieredChunkloaders.java | 7 +- .../gregtech/GregtechTieredFluidTanks.java | 33 +- .../gregtech/GregtechTreeFarmerTE.java | 8 +- .../gregtech/GregtechWirelessChargers.java | 158 +++--- .../gregtech/NewHorizonsAccelerator.java | 144 ----- .../xmod/growthcraft/fishtrap/FishTrapHandler.java | 53 +- src/main/java/gtPlusPlus/xmod/ic2/HANDLER_IC2.java | 14 +- .../gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java | 306 ++++------ .../java/gtPlusPlus/xmod/ob/SprinklerHandler.java | 8 +- .../reliquary/util/ReliquaryRecipeHandler.java | 7 +- .../xmod/thermalfoundation/HANDLER_TF.java | 10 +- .../xmod/thermalfoundation/item/TF_Items.java | 20 +- 97 files changed, 1341 insertions(+), 3322 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSuperConductionPoint.java delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java (limited to 'src/main/java/gtPlusPlus/xmod') diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java index 316e826e37..f46713bdf8 100644 --- a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java @@ -107,32 +107,6 @@ public class BOP_Block_Registrator { 160, 8); - if (!CORE.GTNH) { - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(1L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), - Materials.SeedOil.getFluid(50L), - ItemList.FR_Stick.get(1L, new Object[0]), - 16, - 8); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(8L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), - Materials.SeedOil.getFluid(250L), - ItemList.FR_Casing_Impregnated.get(1L, new Object[0]), - 64, - 16); - GT_Values.RA.addChemicalBathRecipe( - GT_Utility.copyAmount(1L, aStack), - Materials.Creosote.getFluid(1000L), - GT_ModHandler.getModItem("Railcraft", "tile.railcraft.cube", 1L, 8), - null, - null, - null, - 16, - 16); - } - final short aMeta = (short) aStack.getItemDamage(); if (aMeta == 32767) { if (GT_Utility.areStacksEqual( diff --git a/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java b/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java index 04c34f09ce..c652a427ab 100644 --- a/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java +++ b/src/main/java/gtPlusPlus/xmod/cofh/HANDLER_COFH.java @@ -7,7 +7,7 @@ import gtPlusPlus.core.lib.LoadedMods; public class HANDLER_COFH { public static void initItems() { - if (LoadedMods.CoFHCore && (LoadedMods.IndustrialCraft2 || LoadedMods.IndustrialCraft2Classic)) { + if (LoadedMods.CoFHCore) { ModItems.RfEuBattery = new RF2EU_Battery(); } } diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java index c74bb116b0..fb77c4c2e0 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/items/FR_ItemRegistry.java @@ -17,7 +17,6 @@ import net.minecraftforge.common.ChestGenHooks; import cpw.mods.fml.common.Optional; import cpw.mods.fml.common.registry.GameRegistry; import forestry.core.utils.StringUtil; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; public class FR_ItemRegistry { @@ -56,17 +55,10 @@ public class FR_ItemRegistry { // Magic Bee like Frames - if (!CORE.GTNH) { - hiveFrameVoid = new MB_ItemFrame( - MB_FrameType.VOID, - EnumRarity.rare, - "Makes your bee die in the blink of an eye."); - } else { - hiveFrameVoid = new MB_ItemFrame( - MB_FrameType.USELESS, - EnumRarity.common, - "No more cheaty frames for GTNH players."); - } + hiveFrameVoid = new MB_ItemFrame( + MB_FrameType.USELESS, + EnumRarity.common, + "No more cheaty frames for GTNH players."); hiveFrameAccelerated = new MB_ItemFrame( MB_FrameType.ACCELERATED, diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java index ecf7232f02..3ba28fd98c 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/recipe/FR_Gregtech_Recipes.java @@ -4,7 +4,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; @@ -65,24 +64,10 @@ public class FR_Gregtech_Recipes { rod_Uranium, rod_Uranium, hiveFrameMutagenic); - if (!CORE.GTNH) { - RecipeUtils.addShapedGregtechRecipe( - "stickLongThaumium", - "stickThaumium", - "stickLongThaumium", - "stickLongThaumium", - ItemUtils.getSimpleStack(Items.ender_pearl), - "stickLongThaumium", - "stickThaumium", - "stickThaumium", - "stickThaumium", - hiveFrameVoid); - } else { - if (LoadedMods.MagicBees) { - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[] { hiveFrameVoid }, - ItemUtils.getCorrectStacktype("MagicBees:frameOblivion", 1)); - } + if (LoadedMods.MagicBees) { + RecipeUtils.addShapelessGregtechRecipe( + new ItemStack[] { hiveFrameVoid }, + ItemUtils.getCorrectStacktype("MagicBees:frameOblivion", 1)); } RecipeUtils.addShapedGregtechRecipe( "stickLongBlueSteel", diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index 96b17f0685..51f5697cc4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -37,7 +37,6 @@ import gtPlusPlus.api.objects.minecraft.multi.NoEUBonusMultiBehaviour; import gtPlusPlus.api.objects.minecraft.multi.NoOutputBonusMultiBehaviour; import gtPlusPlus.api.objects.minecraft.multi.NoSpeedBonusMultiBehaviour; import gtPlusPlus.core.handler.COMPAT_HANDLER; -import gtPlusPlus.core.handler.OldCircuitHandler; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.CORE.ConfigSwitches; import gtPlusPlus.core.lib.LoadedMods; @@ -88,10 +87,6 @@ public class HANDLER_GT { GT_Materials.init(mMaterialProperties); } - if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH) { - OldCircuitHandler.preInit(); - } - GregtechFluidHandler.run(); } @@ -111,10 +106,6 @@ public class HANDLER_GT { sMetaGeneratedToolInstance = MetaGeneratedGregtechTools.getInstance(); } - if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH) { - OldCircuitHandler.init(); - } - // Generates recipes for all gregtech smelting and alloy smelting combinations. // RecipeGen_BlastSmelterGT.generateRecipes(); // new RecipeGen_BlastSmelterGT_Ex(); @@ -136,10 +127,6 @@ public class HANDLER_GT { GregtechNitroDieselFix.run(); } - if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH) { - OldCircuitHandler.postInit(); - } - // Register custom singles to the PA AddCustomMachineToPA.register(); @@ -508,7 +495,7 @@ public class HANDLER_GT { Item aU; Collection aAssRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList; // 170, 172, 174, 176 - if (aAssRecipes.size() > 0 && (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH)) { + if (aAssRecipes.size() > 0) { recipe: for (GT_Recipe aG : aAssRecipes) { if (aG.mOutputs != null && aG.mOutputs.length > 0) { outputs: for (ItemStack aI : aG.mOutputs) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java index 160ca2ceae..8b7f2bf685 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java @@ -6,7 +6,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatch_Dynamo { @@ -56,18 +55,10 @@ public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatc @Override public String[] getDescription() { String[] g; - if (CORE.GTNH || (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechVersionAsInt() >= 50932)) { - g = new String[] { "Dynamo with internal storage and additional Amp capacity", - "Does not accept more than " + (this.maxEUOutput() * this.maxAmperesIn()) + "EU/t as input", - CORE.GT_Tooltip.get() }; + g = new String[] { "Dynamo with internal storage and additional Amp capacity", + "Does not accept more than " + (this.maxEUOutput() * this.maxAmperesIn()) + "EU/t as input", + CORE.GT_Tooltip.get() }; - } else { - g = new String[] { "Dynamo with internal storage and additional Amp capacity", - "Stores " + maxEUStore() + "EU", "Amperage In: 4", "Amperage Out: 4", - "Does not accept more than " + (this.maxEUOutput() * this.maxAmperesIn()) + "EU/t as input", - "Large Turbines only supply 1A to this, other Multiblocks can inject more amps", - CORE.GT_Tooltip.get() }; - } return g; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java index 96bbde32b5..7897dda8bc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -34,15 +34,13 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch @Override public void onConfigLoad(GT_Config aConfig) { super.onConfigLoad(aConfig); - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { - try { - Integer a1 = (int) StaticFields59.getFieldFromGregtechProxy("mPollutionSmogLimit"); - if (a1 != null && a1 > 0) { - mPollutionSmogLimit = a1; - } - } catch (Throwable t) { - mPollutionSmogLimit = 500000; + try { + Integer a1 = (int) StaticFields59.getFieldFromGregtechProxy("mPollutionSmogLimit"); + if (a1 != null && a1 > 0) { + mPollutionSmogLimit = a1; } + } catch (Throwable t) { + mPollutionSmogLimit = 500000; } } @@ -58,23 +56,18 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public String[] getDescription() { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - String[] mDescArray = StaticFields59.getDescriptionArray(this); - String[] desc = new String[mDescArray.length + 7]; - System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length); - desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; - desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face"; - desc[mDescArray.length + 2] = "Requires Air Filters"; - desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-" + GT_Values.VN[9]; - desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) - + "%"; - desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) - + "% of CO2/CO/SO2"; - desc[mDescArray.length + 6] = CORE.GT_Tooltip.get(); - return desc; - } else { - return new String[] {}; - } + String[] mDescArray = StaticFields59.getDescriptionArray(this); + String[] desc = new String[mDescArray.length + 7]; + System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length); + desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; + desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face"; + desc[mDescArray.length + 2] = "Requires Air Filters"; + desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-" + GT_Values.VN[9]; + desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) + "%"; + desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) + + "% of CO2/CO/SO2"; + desc[mDescArray.length + 6] = CORE.GT_Tooltip.get(); + return desc; } public ITexture[] getTexturesActive(ITexture aBaseTexture) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java index 1605448cfb..edb9a357a7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; -import static gtPlusPlus.core.lib.CORE.GTNH; - import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -16,13 +14,11 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem private static Textures.BlockIcons INSULATION_MEDIUM_PLUS; static { - if (GTNH) { - try { - INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GT_Utility - .getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS").get(null); - } catch (IllegalAccessException | NullPointerException e) { - throw new Error(e); - } + try { + INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GT_Utility + .getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS").get(null); + } catch (IllegalAccessException | NullPointerException e) { + throw new Error(e); } } @@ -92,8 +88,7 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { - return GTNH ? getTextureGTNH(aBaseMetaTileEntity, aSide, aConnections, aColorIndex, aConnected, aRedstone) - : getTexturePure(aBaseMetaTileEntity, aSide, aConnections, aColorIndex, aConnected, aRedstone); + return getTextureGTNH(aBaseMetaTileEntity, aSide, aConnections, aColorIndex, aConnected, aRedstone); } private ITexture[] getTextureGTNH(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, @@ -152,70 +147,4 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } - - private ITexture[] getTexturePure(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, - byte aColorIndex, boolean aConnected, boolean aRedstone) { - - // if (this.vRGB == null || this.vRGB.length < 3 || this.vRGB.length > 4){ - // this.vRGB = new short[]{200, 0, 200, 0}; - // } - // if (this.vRGB.length != 4){ - // short[] tempRGB = this.vRGB; - // this.vRGB = new short[]{tempRGB[0], tempRGB[1], tempRGB[2], 0}; - // } - // - // Materials wireMaterial = this.mMaterial; - // - // if (wireMaterial == null){ - // wireMaterial = Materials.Iron; - // } - - // With the code in constructors it should work - Materials wireMaterial = mMaterial; - if (wireMaterial == null) { - wireMaterial = Materials.Iron; - } - - if (!(this.mInsulated)) return new ITexture[] { new GT_RenderedTexture( - wireMaterial.mIconSet.mTextures[69], - Dyes.getModulation(aColorIndex, this.vRGB)) }; - if (aConnected) { - float tThickNess = getThickNess(); - if (tThickNess < 0.124F) return new ITexture[] { new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.374F) - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_TINY, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.499F) - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_SMALL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.624F) - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_MEDIUM, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.749F) - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_LARGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - if (tThickNess < 0.874F) - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_HUGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], this.vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } - return new ITexture[] { new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java index 6a5fb9d4d2..0a06c89549 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java @@ -35,7 +35,6 @@ import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import ic2.api.energy.tile.IEnergySink; @@ -83,22 +82,20 @@ public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements final String lookingForValue = "mWireHeatingTicks"; int temp = 4; Field field; - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - try { - field = clazz.getClass().getField(lookingForValue); - final Class clazzType = field.getType(); - if (clazzType.toString().equals("int")) { - temp = (field.getInt(clazz)); - } else { - temp = 4; - } - } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - // Utils.LOG_INFO("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - // - PLEASE REPORT THIS."); - Logger.WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); - Logger.ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + try { + field = clazz.getClass().getField(lookingForValue); + final Class clazzType = field.getType(); + if (clazzType.toString().equals("int")) { + temp = (field.getInt(clazz)); + } else { temp = 4; } + } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { + // Utils.LOG_INFO("FATAL ERROR - REFLECTION FAILED FOR GT CABLES + // - PLEASE REPORT THIS."); + Logger.WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + Logger.ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS."); + temp = 4; } return temp; } @@ -365,20 +362,12 @@ public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements this.mTransferredAmperageLast20 = Math.max(this.mTransferredAmperageLast20, this.mTransferredAmperage); if ((aVoltage > this.mVoltage) || (this.mTransferredAmperage > this.mAmperage)) { - // GT 5.09 - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - if (this.mOverheat > (this.mWireHeatingTicks * 100)) { - this.getBaseMetaTileEntity().setToFire(); - } else { - this.mOverheat += 100; - } - return aAmperage; - } - // GT 5.08 - else { + if (this.mOverheat > (this.mWireHeatingTicks * 100)) { this.getBaseMetaTileEntity().setToFire(); - return aAmperage; + } else { + this.mOverheat += 100; } + return aAmperage; } return rUsedAmperes; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 75bb0ce94f..88215b7f44 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -68,7 +68,6 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.*; import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.math.MathUtils; @@ -1886,37 +1885,20 @@ public abstract class GregtechMeta_MultiBlockBase