From 69ce418e29e22391f60cdd55815727762a78c33a Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Fri, 24 May 2024 19:04:17 +0100 Subject: Apply updated GT5u spotless configs --- .../xmod/gregtech/api/enums/GregtechItemList.java | 4 +- .../gregtech/api/enums/GregtechOrePrefixes.java | 795 +++++++++--------- .../xmod/gregtech/api/gui/GTPP_UITextures.java | 132 +-- .../api/gui/widget/ElectricSlotWidget.java | 6 +- .../interfaces/internal/IGregtech_RecipeAdder.java | 102 ++- .../internal/Interface_ItemBehaviour.java | 8 +- .../internal/Interface_OreRecipeRegistrator.java | 4 +- .../interfaces/internal/Interface_ToolStats.java | 6 +- .../gregtech/api/items/Gregtech_Generic_Item.java | 55 +- .../xmod/gregtech/api/items/Gregtech_MetaItem.java | 44 +- .../gregtech/api/items/Gregtech_MetaItem_Base.java | 169 ++-- .../gregtech/api/items/Gregtech_MetaItem_X32.java | 112 +-- .../xmod/gregtech/api/items/Gregtech_MetaTool.java | 394 +++++---- .../GT_MetaTileEntity_ChiselBus.java | 23 +- .../GT_MetaTileEntity_Hatch_AirIntake.java | 57 +- .../GT_MetaTileEntity_Hatch_AirIntake_Extreme.java | 12 +- .../GT_MetaTileEntity_Hatch_DynamoBuffer.java | 8 +- ...etaTileEntity_Hatch_ElementalDataOrbHolder.java | 45 +- .../GT_MetaTileEntity_Hatch_FluidGenerator.java | 29 +- .../GT_MetaTileEntity_Hatch_InputBattery.java | 52 +- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 82 +- .../GT_MetaTileEntity_Hatch_Naquadah.java | 38 +- .../GT_MetaTileEntity_Hatch_OutputBattery.java | 59 +- .../GT_MetaTileEntity_Hatch_Reservoir.java | 4 +- .../GT_MetaTileEntity_Hatch_Solidifier.java | 26 +- .../GT_MetaTileEntity_Hatch_Steam_BusInput.java | 112 ++- .../GT_MetaTileEntity_Hatch_Steam_BusOutput.java | 84 +- .../GT_MetaTileEntity_Hatch_Turbine.java | 89 +- .../GT_MetaTileEntity_Hatch_TurbineProvider.java | 30 +- .../GT_MetaTileEntity_SuperBus_Input.java | 10 +- .../GT_MetaTileEntity_SuperBus_Output.java | 28 +- .../GregtechMetaPipeEntityFluid.java | 76 +- .../GregtechMetaPipeEntity_Cable.java | 141 ++-- .../GregtechMetaTreeFarmerStructural.java | 14 +- .../GT_MetaTileEntity_Hatch_CustomFluidBase.java | 49 +- .../base/GregtechMetaTileEntity.java | 4 +- .../base/GregtechMetaTransformerHiAmp.java | 32 +- .../base/GregtechMeta_MultiBlockBase.java | 902 +++++++++++---------- .../base/GregtechMeta_SteamMultiBase.java | 80 +- .../base/generators/GregtechMetaBoilerBase.java | 109 ++- .../generators/GregtechMetaSolarGenerator.java | 52 +- .../GregtechRocketFuelGeneratorBase.java | 69 +- .../base/machines/GregtechMetaTreeFarmerBase.java | 21 +- .../GT_MetaTileEntity_Hatch_NbtConsumable.java | 101 ++- .../gregtech/api/objects/GregtechItemData.java | 12 +- .../api/objects/GregtechMaterialStack.java | 10 +- .../xmod/gregtech/api/util/GTPP_Config.java | 38 +- 47 files changed, 2263 insertions(+), 2066 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index a9df5bf301..6367d22f77 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -872,7 +872,7 @@ public enum GregtechItemList implements GregtechItemContainer { return false; } return GT_Utility - .areUnificationsEqual((ItemStack) aStack, aWildcard ? this.getWildcard(1) : this.get(1), aIgnoreNBT); + .areUnificationsEqual((ItemStack) aStack, aWildcard ? this.getWildcard(1) : this.get(1), aIgnoreNBT); } public static Block getBlockFromStack(Object aStack) { @@ -922,7 +922,7 @@ public enum GregtechItemList implements GregtechItemContainer { return GT_Utility.copyAmount(aAmount, aReplacements); } return GT_Utility - .copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(this.mStack)); + .copyAmountAndMetaData(aAmount, this.mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(this.mStack)); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java index 03ec5f3fc5..3185810495 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechOrePrefixes.java @@ -46,28 +46,28 @@ public enum GregtechOrePrefixes { * and Lapotronic Energy Orb Infinite (Cheaty) */ ingotHot("Hot Ingots", "Hot ", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], - M * 1, 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. + M * 1, 16, 12), // A hot Ingot, which has to be cooled down by a Vacuum Freezer. ingot("Ingots", "", " Ingot", true, true, false, false, false, false, false, true, false, false, B[1], M * 1, 64, - 11), // A regular Ingot. Introduced by Eloraam + 11), // A regular Ingot. Introduced by Eloraam dustTiny("Tiny Dusts", "Tiny Pile of ", " Dust", true, true, false, false, false, false, false, true, false, false, - B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. + B[0] | B[1] | B[2] | B[3], M / 9, 64, 0), // 1/9th of a Dust. dustSmall("Small Dusts", "Small Pile of ", " Dust", true, true, false, false, false, false, false, true, false, - false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. + false, B[0] | B[1] | B[2] | B[3], M / 4, 64, 1), // 1/4th of a Dust. dustImpure("Impure Dusts", "Impure Pile of ", " Dust", true, true, false, false, false, false, false, true, false, - true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary - // Material + true, B[3], M * 1, 64, 3), // Dust with impurities. 1 Unit of Main Material and 1/9 - 1/4 Unit of secondary + // Material dustRefined("Refined Dusts", "Refined Pile of ", " Dust", true, true, false, false, false, false, false, true, - false, true, B[3], M * 1, 64, 2), + false, true, B[3], M * 1, 64, 2), dustPure("Purified Dusts", "Purified Pile of ", " Dust", true, true, false, false, false, false, false, true, false, - true, B[3], M * 1, 64, 4), + true, B[3], M * 1, 64, 4), dust("Dusts", "", " Dust", true, true, false, false, false, false, false, true, false, false, - B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. + B[0] | B[1] | B[2] | B[3], M * 1, 64, 2), // Pure Dust worth of one Ingot or Gem. Introduced by Alblaka. nugget("Nuggets", "", " Nugget", true, true, false, false, false, false, false, true, false, false, B[1], M / 9, 64, - 9), // A Nugget. Introduced by Eloraam + 9), // A Nugget. Introduced by Eloraam plate("Plates", "", " Plate", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M * 1, - 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia + 64, 17), // Regular Plate made of one Ingot/Dust. Introduced by Calclavia block("Storage Blocks", "Block of ", "", true, true, false, false, false, true, true, false, false, false, 0, M * 9, - 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar + 64, 71), // Storage Block consisting out of 9 Ingots/Gems/Dusts. Introduced by CovertJaguar gem("Gemstones", "", "", true, true, true, false, false, false, true, true, false, false, B[2], M * 1, 64, 8), // A // regular // Gem @@ -78,31 +78,31 @@ public enum GregtechOrePrefixes { // by // Eloraam gemChipped("Chipped Gemstones", "Chipped ", "", true, true, true, false, false, false, true, true, false, false, - B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft + B[2], M / 4, 64, 59), // A regular Gem worth one small Dust. Introduced by TerraFirmaCraft gemFlawed("Flawed Gemstones", "Flawed ", "", true, true, true, false, false, false, true, true, false, false, B[2], - M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft + M / 2, 64, 60), // A regular Gem worth two small Dusts. Introduced by TerraFirmaCraft gemFlawless("Flawless Gemstones", "Flawless ", "", true, true, true, false, false, false, true, true, false, false, - B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft + B[2], M * 2, 32, 61), // A regular Gem worth two Dusts. Introduced by TerraFirmaCraft gemExquisite("Exquisite Gemstones", "Exquisite ", "", true, true, true, false, false, false, true, true, false, - false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft + false, B[2], M * 4, 16, 62), // A regular Gem worth four Dusts. Introduced by TerraFirmaCraft stick("Sticks/Rods", "", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], - M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam + M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam type2("16x Wires", "16x ", " Wire", true, true, false, false, false, false, true, false, false, false, 0, M * 8, 64, - -1), + -1), toolAngleGrinder("Angle Grinder", "", "Angle Grinder", true, true, false, false, false, false, true, true, false, - false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricSnips("Electric Snips", "", "Electric Snips", true, true, false, false, false, false, true, true, false, - false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricLighter("Electric Lighter", "", "Electric Lighter", true, true, false, false, false, false, true, true, - false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. toolElectricButcherKnife("Electric Butcher Knife", "", "Electric Butcher Knife", true, true, false, false, false, - false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. + false, true, true, false, false, B[6], M * 6, 16, 37), // consisting out of 6 Ingots. batterySingleuse("Single Use Batteries", "", "", false, true, false, false, false, false, false, false, false, - false, 0, -1, 64, -1), + false, 0, -1, 64, -1), battery("Reusable Batteries", "", "", false, true, false, false, false, false, false, false, false, false, 0, -1, - 64, -1), // Introduced by Calclavia + 64, -1), // Introduced by Calclavia circuit("Circuits", "", "", true, true, false, false, false, false, false, false, false, false, 0, -1, 64, -1), // Introduced // by // Calclavia @@ -119,7 +119,7 @@ public enum GregtechOrePrefixes { public final short mTextureIndex; public final String mRegularLocalName, mLocalizedMaterialPre, mLocalizedMaterialPost; public final boolean mIsUsedForOreProcessing, mIsEnchantable, mIsUnificatable, mIsMaterialBased, mIsSelfReferencing, - mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; + mIsContainer, mDontUnificateActively, mIsUsedForBlocks, mAllowNormalRecycling, mGenerateDefaultItem; public final List mAspects = new ArrayList<>(); public final Collection mFamiliarPrefixes = new HashSet<>(); /** @@ -129,7 +129,7 @@ public enum GregtechOrePrefixes { public final long mMaterialAmount; private final Collection mNotGeneratedItems = new HashSet<>(), mIgnoredMaterials = new HashSet<>(), - mGeneratedItems = new HashSet<>(); + mGeneratedItems = new HashSet<>(); private final ArrayList mOreProcessing = new ArrayList<>(); private final ArrayList mOreProcessingFake = new ArrayList<>(); public final ItemStack mContainerItem = null; @@ -144,11 +144,11 @@ public enum GregtechOrePrefixes { public int mMaterialGenerationBits = 0; private GregtechOrePrefixes(final String aRegularLocalName, final String aLocalizedMaterialPre, - final String aLocalizedMaterialPost, final boolean aIsUnificatable, final boolean aIsMaterialBased, - final boolean aIsSelfReferencing, final boolean aIsContainer, final boolean aDontUnificateActively, - final boolean aIsUsedForBlocks, final boolean aAllowNormalRecycling, final boolean aGenerateDefaultItem, - final boolean aIsEnchantable, final boolean aIsUsedForOreProcessing, final int aMaterialGenerationBits, - final long aMaterialAmount, final int aDefaultStackSize, final int aTextureindex) { + final String aLocalizedMaterialPost, final boolean aIsUnificatable, final boolean aIsMaterialBased, + final boolean aIsSelfReferencing, final boolean aIsContainer, final boolean aDontUnificateActively, + final boolean aIsUsedForBlocks, final boolean aAllowNormalRecycling, final boolean aGenerateDefaultItem, + final boolean aIsEnchantable, final boolean aIsUsedForOreProcessing, final int aMaterialGenerationBits, + final long aMaterialAmount, final int aDefaultStackSize, final int aTextureindex) { this.mIsUnificatable = aIsUnificatable; this.mIsMaterialBased = aIsMaterialBased; this.mIsSelfReferencing = aIsSelfReferencing; @@ -168,39 +168,73 @@ public enum GregtechOrePrefixes { this.mTextureIndex = (short) aTextureindex; // TODO - Utilise some form of way to check if it's gt 5.9 if so, use string switch. - if (this.name().startsWith("ore")) { + if (this.name() + .startsWith("ore")) { getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("wire") || this.name().startsWith("cable")) { - getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("dust")) { - getTcAspectStack(TC_Aspects.PERDITIO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("crushed")) { - getTcAspectStack(TC_Aspects.PERFODIO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("ingot") || this.name().startsWith("nugget")) { - getTcAspectStack(TC_Aspects.METALLUM.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("armor")) { - getTcAspectStack(TC_Aspects.TUTAMEN.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("stone")) { - getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("pipe")) { - getTcAspectStack(TC_Aspects.ITER.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("gear")) { - getTcAspectStack(TC_Aspects.MOTUS.name(), 1).addToAspectList(this.mAspects); - getTcAspectStack(TC_Aspects.MACHINA.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("frame") || this.name().startsWith("plate")) { - getTcAspectStack(TC_Aspects.FABRICO.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("tool")) { - getTcAspectStack(TC_Aspects.INSTRUMENTUM.name(), 2).addToAspectList(this.mAspects); - } else - if (this.name().startsWith("gem") || this.name().startsWith("crystal") || this.name().startsWith("lens")) { - getTcAspectStack(TC_Aspects.VITREUS.name(), 1).addToAspectList(this.mAspects); - } else if (this.name().startsWith("crate")) { - getTcAspectStack(TC_Aspects.ITER.name(), 2).addToAspectList(this.mAspects); - } else if (this.name().startsWith("circuit")) { - getTcAspectStack("COGNITIO", 1); - } else if (this.name().startsWith("battery")) { - getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); - } + } else if (this.name() + .startsWith("wire") + || this.name() + .startsWith("cable")) { + getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1).addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("dust")) { + getTcAspectStack(TC_Aspects.PERDITIO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("crushed")) { + getTcAspectStack(TC_Aspects.PERFODIO.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("ingot") + || this.name() + .startsWith("nugget")) { + getTcAspectStack(TC_Aspects.METALLUM.name(), 1).addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("armor")) { + getTcAspectStack(TC_Aspects.TUTAMEN.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("stone")) { + getTcAspectStack(TC_Aspects.TERRA.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("pipe")) { + getTcAspectStack(TC_Aspects.ITER.name(), 1).addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("gear")) { + getTcAspectStack(TC_Aspects.MOTUS.name(), 1).addToAspectList(this.mAspects); + getTcAspectStack(TC_Aspects.MACHINA.name(), 1) + .addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("frame") + || this.name() + .startsWith("plate")) { + getTcAspectStack(TC_Aspects.FABRICO.name(), 1) + .addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("tool")) { + getTcAspectStack(TC_Aspects.INSTRUMENTUM.name(), 2) + .addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("gem") + || this.name() + .startsWith("crystal") + || this.name() + .startsWith("lens")) { + getTcAspectStack(TC_Aspects.VITREUS.name(), 1) + .addToAspectList(this.mAspects); + } else + if (this.name() + .startsWith("crate")) { + getTcAspectStack(TC_Aspects.ITER.name(), 2) + .addToAspectList(this.mAspects); + } else if (this.name() + .startsWith("circuit")) { + getTcAspectStack("COGNITIO", 1); + } else if (this.name() + .startsWith("battery")) { + getTcAspectStack(TC_Aspects.ELECTRUM.name(), 1) + .addToAspectList(this.mAspects); + } } public static GregtechOrePrefixes getOrePrefix(final String aOre) { @@ -285,10 +319,9 @@ public enum GregtechOrePrefixes { public boolean doGenerateItem(final Materials aMaterial) { return (aMaterial != null) && (aMaterial != Materials._NULL) - && (((aMaterial.mTypes & this.mMaterialGenerationBits) != 0) - || this.mGeneratedItems.contains(aMaterial)) - && !this.mNotGeneratedItems.contains(aMaterial) - && ((this.mCondition == null) || this.mCondition.isTrue(aMaterial)); + && (((aMaterial.mTypes & this.mMaterialGenerationBits) != 0) || this.mGeneratedItems.contains(aMaterial)) + && !this.mNotGeneratedItems.contains(aMaterial) + && ((this.mCondition == null) || this.mCondition.isTrue(aMaterial)); } public boolean ignoreMaterials(final Materials... aMaterials) { @@ -315,20 +348,20 @@ public enum GregtechOrePrefixes { } public void processOre(final GT_Materials aMaterial, final String aOreDictName, final String aModName, - final ItemStack aStack) { + final ItemStack aStack) { if ((aMaterial != null) - && ((aMaterial != GT_Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) - && GT_Utility.isStackValid(aStack)) { + && ((aMaterial != GT_Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) + && GT_Utility.isStackValid(aStack)) { for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessing) { if (D2) { GT_Log.ore.println( - "Processing '" + aOreDictName - + "' with the Prefix '" - + this.name() - + "' and the Material '" - + aMaterial.name() - + "' at " - + GT_Utility.getClassName(tRegistrator)); + "Processing '" + aOreDictName + + "' with the Prefix '" + + this.name() + + "' and the Material '" + + aMaterial.name() + + "' at " + + GT_Utility.getClassName(tRegistrator)); } tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); } @@ -337,19 +370,19 @@ public enum GregtechOrePrefixes { // TODO public void processOre(final Materials aMaterial, final String aOreDictName, final String aModName, - final ItemStack aStack) { + final ItemStack aStack) { if ((aMaterial != null) && ((aMaterial != Materials._NULL) || this.mIsSelfReferencing || !this.mIsMaterialBased) - && GT_Utility.isStackValid(aStack)) { + && GT_Utility.isStackValid(aStack)) { for (final Interface_OreRecipeRegistrator tRegistrator : this.mOreProcessingFake) { if (D2) { GT_Log.ore.println( - "Processing '" + aOreDictName - + "' with the Prefix '" - + this.name() - + "' and the Material '" - + aMaterial.mName - + "' at " - + GT_Utility.getClassName(tRegistrator)); + "Processing '" + aOreDictName + + "' with the Prefix '" + + this.name() + + "' and the Material '" + + aMaterial.mName + + "' at " + + GT_Utility.getClassName(tRegistrator)); } tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); } @@ -386,231 +419,228 @@ public enum GregtechOrePrefixes { * */ _NULL(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "NULL", 0, 0, 0, 0, false, false, 1, 1, 1, - Dyes._NULL, Element._NULL, Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS.name(), 1))), + Dyes._NULL, Element._NULL, Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS.name(), 1))), // Lapis(526, TextureSet.SET_LAPIS, 1.0F, 0, 1, 1 | 4 | 8, 70, 70, 220, 0, "Lapis", 0, 0, -1, 0, false, false, // 3, 1, 1, Dyes.dyeBlue, 2, Arrays.asList(new MaterialStack(Materials.Lazurite, 12), new // MaterialStack(Materials.Sodalite, 2), new MaterialStack(Materials.Pyrite, 1), new // MaterialStack(Materials.Calcite, 1)), Arrays.asList(getTcAspectStack(TC_Aspects.SENSUS, 1))), Pyrotheum(20, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 255, 128, 0, 0, "Pyrotheum", 0, 0, -1, 0, false, - false, 2, 3, 1, Dyes.dyeYellow, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1)), - Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.IGNIS, 1))), + false, 2, 3, 1, Dyes.dyeYellow, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1)), + Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.IGNIS, 1))), Cryotheum(21, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 102, 178, 255, 0, "Cryotheum", 0, 0, -1, 0, false, - false, 2, 3, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Blizz, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Snow, 1), - new MaterialStack(Materials.Niter, 1)), - Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.GELUM, 1))), + false, 2, 3, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Blizz, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Snow, 1), + new MaterialStack(Materials.Niter, 1)), + Arrays.asList(getTcAspectStack("PRAECANTATIO", 2), getTcAspectStack(TC_Aspects.GELUM, 1))), Ender(22, TextureSet.SET_FLUID, 1.0F, 0, 2, 1, 255, 255, 255, 0, "Ender", 0, 0, -1, 0, false, false, 3, 1, 1, - Dyes.dyeGreen), + Dyes.dyeGreen), /** * Circuitry, Batteries and other Technical things */ Symbiotic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "IV Tier", 0, 0, -1, 0, false, false, 1, 1, - 1, Dyes.dyeLightGray, - Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 4), getTcAspectStack(TC_Aspects.MACHINA, 4))), + 1, Dyes.dyeLightGray, + Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 4), getTcAspectStack(TC_Aspects.MACHINA, 4))), Neutronic(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "LuV Tier", 0, 0, -1, 0, false, false, 1, 1, - 1, Dyes.dyeLightGray, - Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 6), getTcAspectStack(TC_Aspects.MACHINA, 6))), + 1, Dyes.dyeLightGray, + Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 6), getTcAspectStack(TC_Aspects.MACHINA, 6))), Quantum(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 255, 255, 255, 0, "ZPM Tier", 0, 0, -1, 0, false, false, 1, 1, - 1, Dyes.dyeLightGray, - Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8), getTcAspectStack(TC_Aspects.MACHINA, 8))), + 1, Dyes.dyeLightGray, + Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8), getTcAspectStack(TC_Aspects.MACHINA, 8))), Superconductor(-1, TextureSet.SET_NONE, 1.0F, 0, 0, 0, 190, 240, 190, 0, "Superconductor", 0, 0, -1, 0, false, - false, 1, 1, 1, Dyes.dyeGreen, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8))), + false, 1, 1, 1, Dyes.dyeGreen, Arrays.asList(getTcAspectStack(TC_Aspects.ELECTRUM, 8))), Staballoy(30, TextureSet.SET_ROUGH, 10.0F, 5120, 4, 1 | 2 | 16 | 32 | 64 | 128, 68, 75, 66, 0, "Staballoy", 0, - 0, 1500, 2800, true, false, 1, 3, 1, Dyes.dyeGreen, 2, - Arrays.asList(new MaterialStack(Materials.Titanium, 1), new MaterialStack(Materials.Uranium, 9)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + 0, 1500, 2800, true, false, 1, 3, 1, Dyes.dyeGreen, 2, + Arrays.asList(new MaterialStack(Materials.Titanium, 1), new MaterialStack(Materials.Uranium, 9)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), Bedrockium(31, TextureSet.SET_FINE, 8.0F, 8196, 3, 1 | 2 | 16 | 32 | 64 | 128, 39, 39, 39, 0, "Bedrockium", 0, - 0, -1, 0, false, false, 1, 5, 1, Dyes.dyeLightGray, 2, - Arrays.asList(new MaterialStack(Materials.Carbon, 63), new MaterialStack(Materials.Carbon, 56)), - Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS, 8), getTcAspectStack(TC_Aspects.TUTAMEN, 3))), + 0, -1, 0, false, false, 1, 5, 1, Dyes.dyeLightGray, 2, + Arrays.asList(new MaterialStack(Materials.Carbon, 63), new MaterialStack(Materials.Carbon, 56)), + Arrays.asList(getTcAspectStack(TC_Aspects.VACUOS, 8), getTcAspectStack(TC_Aspects.TUTAMEN, 3))), BloodSteel(32, TextureSet.SET_METALLIC, 11.0F, 768, 4, 1 | 2 | 16 | 32 | 64 | 128, 142, 28, 0, 0, "Blood Steel", - 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed, 2, - Arrays.asList(new MaterialStack(Materials.Steel, 3)), - Arrays.asList(getTcAspectStack(TC_Aspects.VICTUS, 8), getTcAspectStack(TC_Aspects.IGNIS, 3))), + 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed, 2, Arrays.asList(new MaterialStack(Materials.Steel, 3)), + Arrays.asList(getTcAspectStack(TC_Aspects.VICTUS, 8), getTcAspectStack(TC_Aspects.IGNIS, 3))), Void(33, TextureSet.SET_METALLIC, 6.0F, 1280, 3, 1 | 2 | 16 | 32 | 64 | 128, 82, 17, 82, 0, "Void Metal", 0, 0, - -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack, - Arrays.asList(getTcAspectStack("PRAECANTATIO", 5), getTcAspectStack(TC_Aspects.VACUOS, 7))), + -1, 0, false, false, 3, 1, 1, Dyes.dyeBlack, + Arrays.asList(getTcAspectStack("PRAECANTATIO", 5), getTcAspectStack(TC_Aspects.VACUOS, 7))), ConductiveIron(34, TextureSet.SET_METALLIC, 5.0F, 256, 2, 1 | 2, 164, 109, 100, 0, "Conductive Iron", 0, 0, -1, - 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, - Arrays.asList(new MaterialStack(Materials.Iron, 6), new MaterialStack(Materials.Redstone, 2)), - Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 2), getTcAspectStack(TC_Aspects.METALLUM, 2))), + 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, + Arrays.asList(new MaterialStack(Materials.Iron, 6), new MaterialStack(Materials.Redstone, 2)), + Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 2), getTcAspectStack(TC_Aspects.METALLUM, 2))), ElectricalSteel(35, TextureSet.SET_METALLIC, 7.0F, 768, 3, 1 | 2 | 64 | 128, 194, 194, 194, 0, - "Electrical Steel", 0, 0, 1811, 1000, true, false, 3, 1, 1, Dyes.dyeLightGray, 2, - Arrays.asList( - new MaterialStack(Materials.Iron, 3), - new MaterialStack(Materials.Coal, 2), - new MaterialStack(Materials.Silicon, 2)), - Arrays.asList(getTcAspectStack(TC_Aspects.MAGNETO, 2), getTcAspectStack(TC_Aspects.ELECTRUM, 5))), + "Electrical Steel", 0, 0, 1811, 1000, true, false, 3, 1, 1, Dyes.dyeLightGray, 2, + Arrays.asList( + new MaterialStack(Materials.Iron, 3), + new MaterialStack(Materials.Coal, 2), + new MaterialStack(Materials.Silicon, 2)), + Arrays.asList(getTcAspectStack(TC_Aspects.MAGNETO, 2), getTcAspectStack(TC_Aspects.ELECTRUM, 5))), EnergeticAlloy(36, TextureSet.SET_SHINY, 5.0F, 512, 3, 1 | 2 | 64 | 128, 252, 152, 45, 0, "Energetic Alloy", 0, - 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange, 2, - Arrays.asList( - new MaterialStack(Materials.Gold, 3), - new MaterialStack(Materials.Glowstone, 2), - new MaterialStack(Materials.Redstone, 2)), - Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 4), getTcAspectStack(TC_Aspects.LUX, 3))), + 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange, 2, + Arrays.asList( + new MaterialStack(Materials.Gold, 3), + new MaterialStack(Materials.Glowstone, 2), + new MaterialStack(Materials.Redstone, 2)), + Arrays.asList(getTcAspectStack(TC_Aspects.POTENTIA, 4), getTcAspectStack(TC_Aspects.LUX, 3))), VibrantAlloy(37, TextureSet.SET_SHINY, 7.0F, 1280, 4, 1 | 2 | 64 | 128, 204, 242, 142, 0, "Vibrant Alloy", 0, 0, - -1, 0, false, false, 3, 1, 1, Dyes.dyeLime, 2, - Arrays.asList( - new MaterialStack(Materials.EnergeticAlloy, 1), - new MaterialStack(Materials.EnderPearl, 3)), - Arrays.asList(getTcAspectStack(TC_Aspects.MACHINA, 5), getTcAspectStack(TC_Aspects.TELUM, 4))), + -1, 0, false, false, 3, 1, 1, Dyes.dyeLime, 2, + Arrays.asList(new MaterialStack(Materials.EnergeticAlloy, 1), new MaterialStack(Materials.EnderPearl, 3)), + Arrays.asList(getTcAspectStack(TC_Aspects.MACHINA, 5), getTcAspectStack(TC_Aspects.TELUM, 4))), PulsatingIron(38, TextureSet.SET_SHINY, 5.0F, 256, 2, 1 | 2 | 64 | 128, 50, 91, 21, 0, "Pulsating Iron", 0, 0, - -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen, 2, - Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.EnderPearl, 2)), - Arrays.asList(getTcAspectStack(TC_Aspects.ALIENIS, 3), getTcAspectStack(TC_Aspects.METALLUM, 3))), + -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen, 2, + Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.EnderPearl, 2)), + Arrays.asList(getTcAspectStack(TC_Aspects.ALIENIS, 3), getTcAspectStack(TC_Aspects.METALLUM, 3))), /* TODO */ RedstoneAlloy(39, TextureSet.SET_METALLIC, 1.0F, 256, 2, 1 | 2 | 16 | 32 | 64, 178, 34, 34, 0, - "Redstone Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, - Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.Redstone, 4))), + "Redstone Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 2, + Arrays.asList(new MaterialStack(Materials.Iron, 2), new MaterialStack(Materials.Redstone, 4))), // Needs more Use, I think. Tantalloy60(40, TextureSet.SET_DULL, 8.0F, 5120, 3, 1 | 2 | 16 | 32 | 64 | 128, 68, 75, 166, 0, "Tantalloy-60", - 0, 0, 3035, 2200, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + 0, 0, 3035, 2200, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList(new MaterialStack(Materials.Tungsten, 1), new MaterialStack(Materials.Tantalum, 9)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), Tantalloy61(41, TextureSet.SET_DULL, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 122, 135, 196, 0, - "Tantalloy-61", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + "Tantalloy-61", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), Potin(42, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 201, 151, 129, 0, "Potin", 0, 0, - 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), Inconel792(43, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 108, 240, 118, 0, - "Inconel-792", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + "Inconel-792", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), Inconel690(44, TextureSet.SET_DULL, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 118, 220, 138, 0, "Inconel-690", - 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), MaragingSteel300(45, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 150, 150, 150, 0, - "Maraging Steel 300", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + "Maraging Steel 300", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), MaragingSteel350(46, TextureSet.SET_METALLIC, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 160, 160, 160, 0, - "Maraging Steel 350", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + "Maraging Steel 350", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), HastelloyX(47, TextureSet.SET_SHINY, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 255, 193, 37, 0, "Hastelloy-X", - 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), TriniumNaquadahCarbonite(48, TextureSet.SET_SHINY, 7.0F, 5120, 2, 1 | 2 | 16 | 32 | 64 | 128, 255, 233, 0, 0, - "Trinium Naquadah Carbonite", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, - Arrays.asList( - new MaterialStack(Materials.Tungsten, 1), - new MaterialStack(Materials.Tantalum, 9), - new MaterialStack(Materials.Titanium, 1)), - Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), + "Trinium Naquadah Carbonite", 0, 0, 3015, 2150, true, false, 1, 2, 1, Dyes.dyeLightBlue, 2, + Arrays.asList( + new MaterialStack(Materials.Tungsten, 1), + new MaterialStack(Materials.Tantalum, 9), + new MaterialStack(Materials.Titanium, 1)), + Arrays.asList(getTcAspectStack(TC_Aspects.METALLUM, 8), getTcAspectStack(TC_Aspects.STRONTIO, 3))), // Radioactive Materials HydrofluoricAcid(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 200, 200, 200, 0, "Hydrofluoric Acid", 0, 0, - -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), UraniumHexaFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 73, 220, 83, 0, "Uranium Hexafluoride", - 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), UraniumTetraFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 73, 220, 83, 0, "Uranium Tetrafluoride", - 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeLime, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), ThoriumTetraFluoride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 15, 120, 15, 0, "Thorium Tetrafluoride", - 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeGreen, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeGreen, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), SulfurousAcid(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 110, 220, 30, 0, "Sulfurous Acid", 0, 0, -1, 0, - false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), SulfurDioxide(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 150, 200, 50, 0, "Sulfur Dioxide", 0, 0, -1, 0, - false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), HydrogenChloride(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 150, 240, 90, 0, "Hydrogen Chloride", 0, 0, - -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), SulfuricApatite(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Sulfuric Apatite Solution", - 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), SulfuricLithium(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Sulfuric Lithium Solution", - 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))), + 0, 0, -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))), LithiumHydroxide(-1, TextureSet.SET_FLUID, 1.0F, 0, 1, 2 | 16 | 32, 0, 105, 105, 0, "Lithium Hydroxide", 0, 0, - -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, - Arrays.asList( - new MaterialStack(Materials.Coal, 1), - new MaterialStack(Materials.Redstone, 1), - new MaterialStack(Materials.Blaze, 1), - new MaterialStack(Materials.Sulfur, 1))),; + -1, 0, false, false, 2, 3, 1, Dyes.dyeWhite, 2, + Arrays.asList( + new MaterialStack(Materials.Coal, 1), + new MaterialStack(Materials.Redstone, 1), + new MaterialStack(Materials.Blaze, 1), + new MaterialStack(Materials.Sulfur, 1))),; /** * List of all Materials. @@ -654,7 +684,7 @@ public enum GregtechOrePrefixes { public Dyes mColor = Dyes._NULL; public short mMeltingPoint = 0, mBlastFurnaceTemp = 0; public int mTypes = 0, mDurability = 16, mFuelPower = 0, mFuelType = 0, mExtraData = 0, mOreValue = 0, - mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1; + mOreMultiplier = 1, mByProductMultiplier = 1, mSmeltingMultiplier = 1; public long mDensity = M; public Element mElement = null; public GT_Materials mDirectSmelting = this; @@ -675,7 +705,7 @@ public enum GregtechOrePrefixes { public final Fluid mStandardMoltenFluid = null; private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, - final int aToolDurability, final int aToolQuality, final boolean aUnificatable) { + final int aToolDurability, final int aToolQuality, final boolean aUnificatable) { this.mUnificatable = aUnificatable; this.mMaterialInto = this; this.mMetaItemSubID = aMetaItemSubID; @@ -725,11 +755,11 @@ public enum GregtechOrePrefixes { * @param aColor Vanilla MC Wool Color which comes the closest to this. */ private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, - final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, - final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, - final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, - final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, - final int aDensityDivider, final Dyes aColor) { + final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, + final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, + final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, + final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, + final Dyes aColor) { this(aMetaItemSubID, aIconSet, aToolSpeed, aToolDurability, aToolQuality, true); this.mDefaultLocalName = aLocalName; this.mMeltingPoint = (short) aMeltingPoint; @@ -757,33 +787,33 @@ public enum GregtechOrePrefixes { } private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, - final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, - final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, - final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, - final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, - final int aDensityDivider, final Dyes aColor, final List aAspects) { + final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, + final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, + final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, + final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, + final Dyes aColor, final List aAspects) { this( - aMetaItemSubID, - aIconSet, - aToolSpeed, - aToolDurability, - aToolQuality, - aTypes, - aR, - aG, - aB, - aA, - aLocalName, - aFuelType, - aFuelPower, - aMeltingPoint, - aBlastFurnaceTemp, - aBlastFurnaceRequired, - aTransparent, - aOreValue, - aDensityMultiplier, - aDensityDivider, - aColor); + aMetaItemSubID, + aIconSet, + aToolSpeed, + aToolDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor); this.mAspects.addAll(aAspects); } @@ -791,34 +821,33 @@ public enum GregtechOrePrefixes { * @param aElement The Element Enum represented by this Material */ private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, - final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, - final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, - final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, - final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, - final int aDensityDivider, final Dyes aColor, final Element aElement, - final List aAspects) { + final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, + final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, + final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, + final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, + final Dyes aColor, final Element aElement, final List aAspects) { this( - aMetaItemSubID, - aIconSet, - aToolSpeed, - aToolDurability, - aToolQuality, - aTypes, - aR, - aG, - aB, - aA, - aLocalName, - aFuelType, - aFuelPower, - aMeltingPoint, - aBlastFurnaceTemp, - aBlastFurnaceRequired, - aTransparent, - aOreValue, - aDensityMultiplier, - aDensityDivider, - aColor); + aMetaItemSubID, + aIconSet, + aToolSpeed, + aToolDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor); this.mElement = aElement; // mElement.mLinkedMaterials.add(this); if (aElement == Element._NULL) { @@ -831,68 +860,67 @@ public enum GregtechOrePrefixes { } private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, - final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, - final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, - final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, - final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, - final int aDensityDivider, final Dyes aColor, final int aExtraData, - final List aMaterialList) { + final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, + final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, + final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, + final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, + final Dyes aColor, final int aExtraData, final List aMaterialList) { this( - aMetaItemSubID, - aIconSet, - aToolSpeed, - aToolDurability, - aToolQuality, - aTypes, - aR, - aG, - aB, - aA, - aLocalName, - aFuelType, - aFuelPower, - aMeltingPoint, - aBlastFurnaceTemp, - aBlastFurnaceRequired, - aTransparent, - aOreValue, - aDensityMultiplier, - aDensityDivider, - aColor, - aExtraData, - aMaterialList, - null); + aMetaItemSubID, + aIconSet, + aToolSpeed, + aToolDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor, + aExtraData, + aMaterialList, + null); } private GT_Materials(final int aMetaItemSubID, final TextureSet aIconSet, final float aToolSpeed, - final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, - final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, - final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, - final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, - final int aDensityDivider, final Dyes aColor, final int aExtraData, - final List aMaterialList, final List aAspects) { + final int aToolDurability, final int aToolQuality, final int aTypes, final int aR, final int aG, + final int aB, final int aA, final String aLocalName, final int aFuelType, final int aFuelPower, + final int aMeltingPoint, final int aBlastFurnaceTemp, final boolean aBlastFurnaceRequired, + final boolean aTransparent, final int aOreValue, final int aDensityMultiplier, final int aDensityDivider, + final Dyes aColor, final int aExtraData, final List aMaterialList, + final List aAspects) { this( - aMetaItemSubID, - aIconSet, - aToolSpeed, - aToolDurability, - aToolQuality, - aTypes, - aR, - aG, - aB, - aA, - aLocalName, - aFuelType, - aFuelPower, - aMeltingPoint, - aBlastFurnaceTemp, - aBlastFurnaceRequired, - aTransparent, - aOreValue, - aDensityMultiplier, - aDensityDivider, - aColor); + aMetaItemSubID, + aIconSet, + aToolSpeed, + aToolDurability, + aToolQuality, + aTypes, + aR, + aG, + aB, + aA, + aLocalName, + aFuelType, + aFuelPower, + aMeltingPoint, + aBlastFurnaceTemp, + aBlastFurnaceRequired, + aTransparent, + aOreValue, + aDensityMultiplier, + aDensityDivider, + aColor); this.mExtraData = aExtraData; this.mMaterialList.addAll(aMaterialList); this.mChemicalFormula = ""; @@ -948,17 +976,18 @@ public enum GregtechOrePrefixes { */ public static void init(final GT_Config aConfiguration) { for (final GT_Materials tMaterial : VALUES) { - final String tString = tMaterial.toString().toLowerCase(); + final String tString = tMaterial.toString() + .toLowerCase(); tMaterial.mHeatDamage = (float) aConfiguration - .get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage); + .get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage); if (tMaterial.mBlastFurnaceRequired) { tMaterial.mBlastFurnaceRequired = aConfiguration - .get(ConfigCategories.Materials.blastfurnacerequirements, tString, true); + .get(ConfigCategories.Materials.blastfurnacerequirements, tString, true); } if (tMaterial.mBlastFurnaceRequired && aConfiguration.get( - ConfigCategories.Materials.blastinductionsmelter, - tString, - tMaterial.mBlastFurnaceTemp < 1500)) {} + ConfigCategories.Materials.blastinductionsmelter, + tString, + tMaterial.mBlastFurnaceTemp < 1500)) {} } } @@ -1041,10 +1070,10 @@ public enum GregtechOrePrefixes { } if ((aMultiplier >= (M * 2)) && !this.mMaterialList.isEmpty()) { return (((this.mElement != null) - || ((this.mMaterialList.size() < 2) && (this.mMaterialList.get(0).mAmount == 1))) - ? this.mChemicalFormula - : "(" + this.mChemicalFormula + ")") - + aMultiplier; + || ((this.mMaterialList.size() < 2) && (this.mMaterialList.get(0).mAmount == 1))) + ? this.mChemicalFormula + : "(" + this.mChemicalFormula + ")") + + aMultiplier; } return this.mChemicalFormula; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java index febd8aea62..e6276713f3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/GTPP_UITextures.java @@ -12,126 +12,128 @@ public class GTPP_UITextures { public static final UITexture OVERLAY_SLOT_COAL = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/coal"); public static final UITexture OVERLAY_SLOT_CANISTER_DARK = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/canister_dark"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/canister_dark"); public static final AdaptableUITexture BACKGROUND_YELLOW = AdaptableUITexture - .of(GTPlusPlus.ID, "gui/background/yellow", 176, 166, 4); + .of(GTPlusPlus.ID, "gui/background/yellow", 176, 166, 4); public static final AdaptableUITexture SLOT_ITEM_YELLOW = AdaptableUITexture - .of(GTPlusPlus.ID, "gui/slot/item_yellow", 18, 18, 1); + .of(GTPlusPlus.ID, "gui/slot/item_yellow", 18, 18, 1); public static final AdaptableUITexture[] SLOT_INVENTORY_MANAGER = new AdaptableUITexture[] { - AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/red", 18, 18, 1), - AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/green", 18, 18, 1), - AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/blue", 18, 18, 1), - AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/cyan", 18, 18, 1), - AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/magenta", 18, 18, 1), - AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/yellow", 18, 18, 1), }; + AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/red", 18, 18, 1), + AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/green", 18, 18, 1), + AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/blue", 18, 18, 1), + AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/cyan", 18, 18, 1), + AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/magenta", 18, 18, 1), + AdaptableUITexture.of(GTPlusPlus.ID, "gui/slot/yellow", 18, 18, 1), }; public static final UITexture BUTTON_STANDARD_BRONZE = UITexture - .fullImage(GTPlusPlus.ID, "gui/button/standard_bronze"); + .fullImage(GTPlusPlus.ID, "gui/button/standard_bronze"); public static final UITexture OVERLAY_SLOT_WEED_EX = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/weed_ex"); public static final UITexture OVERLAY_SLOT_FERTILIZER = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/fertilizer"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/fertilizer"); public static final UITexture OVERLAY_SLOT_ELECTRIC_TOOL = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/electric_tool"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/electric_tool"); public static final UITexture OVERLAY_SLOT_PAGE_PRINTED_BRONZE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/page_printed_bronze"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/page_printed_bronze"); public static final UITexture OVERLAY_SLOT_ARROW = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow"); public static final UITexture OVERLAY_SLOT_ARROW_BRONZE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_bronze"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_bronze"); public static final UITexture OVERLAY_SLOT_CRAFT_OUTPUT = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/craft_output"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/craft_output"); public static final UITexture OVERLAY_SLOT_CRAFT_OUTPUT_BRONZE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/craft_output_bronze"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/craft_output_bronze"); public static final UITexture OVERLAY_SLOT_PARK = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/park"); public static final UITexture OVERLAY_SLOT_PARK_BRONZE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_slot/park_bronze"); + .fullImage(GTPlusPlus.ID, "gui/overlay_slot/park_bronze"); public static final UITexture OVERLAY_SLOT_INGOT = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/ingot"); public static final UITexture OVERLAY_SLOT_ARROW_4 = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_4"); public static final UITexture OVERLAY_SLOT_TURBINE = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/turbine"); public static final UITexture OVERLAY_SLOT_CHEST = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/chest"); public static final UITexture[] OVERLAY_SLOT_INVENTORY_MANAGER_COLOR = new UITexture[] { - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/red"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/green"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/blue"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/cyan"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/magenta"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/yellow"), }; + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/red"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/green"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/blue"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/cyan"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/magenta"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/yellow"), }; public static final UITexture[] OVERLAY_SLOT_INVENTORY_MANAGER_ARROW = new UITexture[] { - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_red"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_green"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_blue"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_cyan"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_magenta"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_yellow"), }; + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_red"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_green"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_blue"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_cyan"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_magenta"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_slot/arrow_yellow"), }; public static final UITexture PROGRESSBAR_FLUID_REACTOR = UITexture - .fullImage(GTPlusPlus.ID, "gui/progressbar/fluid_reactor"); + .fullImage(GTPlusPlus.ID, "gui/progressbar/fluid_reactor"); public static final UITexture PROGRESSBAR_BOILER_EMPTY = UITexture - .fullImage(GTPlusPlus.ID, "gui/progressbar/boiler_empty"); + .fullImage(GTPlusPlus.ID, "gui/progressbar/boiler_empty"); public static final UITexture PROGRESSBAR_FUEL = UITexture.fullImage(GTPlusPlus.ID, "gui/progressbar/fuel"); public static final UITexture PROGRESSBAR_ARROW_2 = UITexture.fullImage(GTPlusPlus.ID, "gui/progressbar/arrow_2"); public static final UITexture PROGRESSBAR_PSS_ENERGY = UITexture - .fullImage(GTPlusPlus.ID, "gui/progressbar/pss_energy"); + .fullImage(GTPlusPlus.ID, "gui/progressbar/pss_energy"); public static final AdaptableUITexture TAB_TITLE_YELLOW = AdaptableUITexture - .of(GTPlusPlus.ID, "gui/tab/title_yellow", 28, 28, 4); + .of(GTPlusPlus.ID, "gui/tab/title_yellow", 28, 28, 4); public static final AdaptableUITexture TAB_TITLE_ANGULAR_YELLOW = AdaptableUITexture - .of(GTPlusPlus.ID, "gui/tab/title_angular_yellow", 28, 28, 4); + .of(GTPlusPlus.ID, "gui/tab/title_angular_yellow", 28, 28, 4); public static final AdaptableUITexture TAB_TITLE_DARK_YELLOW = AdaptableUITexture - .of(GTPlusPlus.ID, "gui/tab/title_dark_yellow", 28, 28, 4); + .of(GTPlusPlus.ID, "gui/tab/title_dark_yellow", 28, 28, 4); public static final UITexture OVERLAY_BUTTON_HARVESTER_MODE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/harvester_mode"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/harvester_mode"); public static final UITexture OVERLAY_BUTTON_HARVESTER_TOGGLE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/harvester_toggle"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/harvester_toggle"); public static final UITexture OVERLAY_BUTTON_FLUSH = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/flush"); public static final UITexture OVERLAY_BUTTON_FLUSH_BRONZE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/flush_bronze"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/flush_bronze"); public static final UITexture OVERLAY_BUTTON_AUTOMATION = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/automation"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/automation"); public static final UITexture OVERLAY_BUTTON_LOCK = UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/lock"); public static final UITexture[] OVERLAY_BUTTON_THROUGHPUT = IntStream.range(0, 4) // GT_MetaTileEntity_ElectricAutoWorkbench#MAX_THROUGHPUT - .mapToObj(i -> UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/throughput_" + i)) - .collect(Collectors.toList()).toArray(new UITexture[0]); + .mapToObj(i -> UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/throughput_" + i)) + .collect(Collectors.toList()) + .toArray(new UITexture[0]); public static final UITexture[] OVERLAY_BUTTON_MODE = IntStream.range(0, 10) // GT_MetaTileEntity_ElectricAutoWorkbench#MAX_MODES - .mapToObj(i -> UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/mode_" + i)) - .collect(Collectors.toList()).toArray(new UITexture[0]); + .mapToObj(i -> UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/mode_" + i)) + .collect(Collectors.toList()) + .toArray(new UITexture[0]); public static final UITexture[] OVERLAY_BUTTON_DIRECTION = new UITexture[] { - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/bottom"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/top"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/north"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/south"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/west"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/east"), }; + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/bottom"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/top"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/north"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/south"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/west"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/east"), }; public static final UITexture[] OVERLAY_BUTTON_DIRECTION_GRAY = new UITexture[] { - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/bottom_gray"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/top_gray"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/north_gray"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/south_gray"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/west_gray"), - UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/east_gray"), }; + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/bottom_gray"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/top_gray"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/north_gray"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/south_gray"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/west_gray"), + UITexture.fullImage(GTPlusPlus.ID, "gui/overlay_button/east_gray"), }; public static final UITexture OVERLAY_BUTTON_TIP_GREEN = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/tip_green"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/tip_green"); public static final UITexture OVERLAY_BUTTON_TIP_RED = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/tip_red"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/tip_red"); public static final UITexture OVERLAY_BUTTON_ACTIVE_STATE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/active_state"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/active_state"); public static final UITexture OVERLAY_BUTTON_CHANGE_MODE = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/change_mode"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/change_mode"); public static final UITexture OVERLAY_BUTTON_PLUS_MINUS = UITexture - .fullImage(GTPlusPlus.ID, "gui/overlay_button/plus_minus"); + .fullImage(GTPlusPlus.ID, "gui/overlay_button/plus_minus"); public static final UITexture PICTURE_WORKBENCH_CIRCLE = UITexture - .fullImage(GTPlusPlus.ID, "gui/picture/workbench_circle"); + .fullImage(GTPlusPlus.ID, "gui/picture/workbench_circle"); public static final UITexture PICTURE_ARROW_WHITE_DOWN = UITexture - .fullImage(GTPlusPlus.ID, "gui/picture/arrow_white_down"); + .fullImage(GTPlusPlus.ID, "gui/picture/arrow_white_down"); public static final UITexture PICTURE_REDSTONE_CIRCUIT_SCREEN = UITexture - .fullImage(GTPlusPlus.ID, "gui/picture/redstone_circuit_screen"); + .fullImage(GTPlusPlus.ID, "gui/picture/redstone_circuit_screen"); public static final UITexture PICTURE_ELECTRICITY_ERROR = UITexture - .fullImage(GTPlusPlus.ID, "gui/picture/electricity_error"); + .fullImage(GTPlusPlus.ID, "gui/picture/electricity_error"); public static final UITexture PICTURE_ELECTRICITY_FINE = UITexture - .fullImage(GTPlusPlus.ID, "gui/picture/electricity_fine"); + .fullImage(GTPlusPlus.ID, "gui/picture/electricity_fine"); public static final UITexture PICTURE_ENERGY_FRAME = UITexture.fullImage(GTPlusPlus.ID, "gui/picture/energy_frame"); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java index d555317717..e522d41799 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/widget/ElectricSlotWidget.java @@ -26,8 +26,8 @@ public class ElectricSlotWidget extends SlotWidget { private ElectricSlotWidget(BaseSlot slot) { super(slot); setFilter( - stack -> (accepts(stack)) || (stack.getItem() instanceof GT_MetaGenerated_Tool) - || (stack.getItem() instanceof IElectricItem)); + stack -> (accepts(stack)) || (stack.getItem() instanceof GT_MetaGenerated_Tool) + || (stack.getItem() instanceof IElectricItem)); } private boolean accepts(final ItemStack stack) { @@ -35,6 +35,6 @@ public class ElectricSlotWidget extends SlotWidget { return false; } return (Info.itemEnergy.getEnergyValue(stack) > 0.0D) - || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D); + || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), 4, true, true, true) > 0.0D); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java index 6754828db2..faa39dadc3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java @@ -22,13 +22,13 @@ public interface IGregtech_RecipeAdder { * @return true if the Recipe got added, otherwise false. */ boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput, int aDuration, int aEUt); + ItemStack aOutput, int aDuration, int aEUt); boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, int aDuration, int aEUt); + ItemStack[] aOutputs, int aDuration, int aEUt); boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt); + FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt); /** * Adds a Matter Fabricator Recipe @@ -55,7 +55,7 @@ public interface IGregtech_RecipeAdder { * @return true if the Recipe got added, otherwise false. */ boolean addDehydratorRecipe(ItemStack[] aInput, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt); + ItemStack[] aOutputItems, int[] aChances, int aDuration, int aEUt); /** * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) @@ -83,7 +83,7 @@ public interface IGregtech_RecipeAdder { */ boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, - int aDuration, int aEUt); + int aDuration, int aEUt); /** * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs, More than 1 Fluids) @@ -98,7 +98,7 @@ public interface IGregtech_RecipeAdder { */ boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, int aChance, - int aDuration, int aEUt); + int aDuration, int aEUt); /** * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) @@ -114,14 +114,13 @@ public interface IGregtech_RecipeAdder { */ boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, - ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt); + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt); boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, - int aDuration, int aEUt, int aSpecialValue); + int aDuration, int aEUt, int aSpecialValue); boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, - ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue, - boolean aOptimizeRecipe); + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue, boolean aOptimizeRecipe); /** * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs, More than 1 fluids) @@ -137,14 +136,13 @@ public interface IGregtech_RecipeAdder { */ boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, - ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt); + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt); boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, int aChance, - int aDuration, int aEUt, int aSpecialValue); + int aDuration, int aEUt, int aSpecialValue); boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, - ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue, - boolean aOptimizeRecipe); + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue, boolean aOptimizeRecipe); /** * Adds a Recipe for the LFTRr. (up to 9 Inputs) @@ -161,7 +159,7 @@ public interface IGregtech_RecipeAdder { */ boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, - ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue); + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue); /** * Adds a Recipe for the Quantum Force Smelter (up to 9 Inputs) @@ -169,7 +167,7 @@ public interface IGregtech_RecipeAdder { * **/ boolean addQuantumTransformerRecipe(ItemStack[] aInput, FluidStack[] aFluidInput, FluidStack[] aFluidOutput, - ItemStack[] aOutputStack, int[] aChances, int aDuration, int aEUt, int aSpecialValue); + ItemStack[] aOutputStack, int[] aChances, int aDuration, int aEUt, int aSpecialValue); /** * Adds a Recipe for the LFTRr. (up to 9 Inputs, More than 1 fluids) @@ -186,7 +184,7 @@ public interface IGregtech_RecipeAdder { */ @Deprecated boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, - ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue); + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue); /** * Adds a custom Semifluid fuel for the GT++ SemiFluid Generators. @@ -207,36 +205,36 @@ public interface IGregtech_RecipeAdder { boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue); boolean addFissionFuel(FluidStack aInput1, FluidStack aInput2, FluidStack aInput3, FluidStack aInput4, - FluidStack aInput5, FluidStack aInput6, FluidStack aInput7, FluidStack aInput8, FluidStack aInput9, - FluidStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt); + FluidStack aInput5, FluidStack aInput6, FluidStack aInput7, FluidStack aInput8, FluidStack aInput9, + FluidStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt); boolean addFissionFuel(boolean aOptimise, FluidStack aInput1, FluidStack aInput2, FluidStack aInput3, - FluidStack aInput4, FluidStack aInput5, FluidStack aInput6, FluidStack aInput7, FluidStack aInput8, - FluidStack aInput9, FluidStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt); + FluidStack aInput4, FluidStack aInput5, FluidStack aInput6, FluidStack aInput7, FluidStack aInput8, + FluidStack aInput9, FluidStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt); boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, FluidStack aFluidOutput, - int[] aChances, int aDuration, int aEUt, int aSpecialValue); + int[] aChances, int aDuration, int aEUt, int aSpecialValue); boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput, - FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue); + FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue); @Deprecated boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt); + FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, + ItemStack aOutput4, int aDuration, int aEUt); boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); + ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); + ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); + ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial); @Deprecated boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, - int aEUt); + int aEUt); /** * Adds an Assemblyline Recipe @@ -249,7 +247,7 @@ public interface IGregtech_RecipeAdder { */ @Deprecated boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, - FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt); + FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt); /** * Adds a Assemblyline Recipe @@ -259,34 +257,34 @@ public interface IGregtech_RecipeAdder { */ @Deprecated boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, - FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); + FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt); @Deprecated boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, - ItemStack output, int time, int eu); + ItemStack output, int time, int eu); @Deprecated boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, - ItemStack output, Object object, int time, int eu); + ItemStack output, Object object, int time, int eu); @Deprecated boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, - ItemStack output, ItemStack object, int time); + ItemStack output, ItemStack object, int time); @Deprecated boolean addChemicalRecipe(ItemStack input1, ItemStack input2, int aCircuit, FluidStack inputFluid, - FluidStack outputFluid, ItemStack output, ItemStack output2, int time, int eu); + FluidStack outputFluid, ItemStack output, ItemStack output2, int time, int eu); @Deprecated boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, - ItemStack[] outputs, int time, int eu); + ItemStack[] outputs, int time, int eu); @Deprecated boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); @Deprecated boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, - boolean aHidden); + boolean aHidden); @Deprecated boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden); @@ -299,41 +297,41 @@ public interface IGregtech_RecipeAdder { @Deprecated boolean addFluidExtractionRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidOut, int aTime, - int aEu); + int aEu); @Deprecated boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn); @Deprecated boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, - FluidStack rFluidOut); + FluidStack rFluidOut); @Deprecated boolean addFluidCannerRecipe(ItemStack aContainer, ItemStack aFullContainer, FluidStack rFluidIn, - FluidStack rFluidOut, int aTime, int aEu); + FluidStack rFluidOut, int aTime, int aEu); boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); + FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel); + FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel); @Deprecated boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aOutput, int time, long eu); boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, int time, long eu, int aTier); + FluidStack[] aFluidOutputs, int time, long eu, int aTier); boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier); + FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier); @Deprecated boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, - FluidStack[] aFluidOutputs, int time, long eu, int aHeat); + FluidStack[] aFluidOutputs, int time, long eu, int aHeat); @Deprecated boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, - FluidStack aFluidOutput, int aDuration, int aEUt); + FluidStack aFluidOutput, int aDuration, int aEUt); @Deprecated boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); @@ -343,21 +341,21 @@ public interface IGregtech_RecipeAdder { @Deprecated boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, - int aDuration, int aEUt, boolean aHidden); + int aDuration, int aEUt, boolean aHidden); @Deprecated boolean addPulverisationRecipe(final ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - final ItemStack aOutput3); + final ItemStack aOutput3); boolean addMillingRecipe(Materials aMat, int aEU); boolean addMillingRecipe(Material aMat, int aEU); boolean addFlotationRecipe(Materials aMat, ItemStack aXanthate, FluidStack[] aInputFluids, - FluidStack[] aOutputFluids, int aTime, int aEU); + FluidStack[] aOutputFluids, int aTime, int aEU); boolean addFlotationRecipe(Material aMat, ItemStack aXanthate, FluidStack[] aInputFluids, - FluidStack[] aOutputFluids, int aTime, int aEU); + FluidStack[] aOutputFluids, int aTime, int aEU); @Deprecated boolean addpackagerRecipe(ItemStack aRecipeType, ItemStack aInput1, ItemStack aInput2, ItemStack aOutputStack1); @@ -365,10 +363,10 @@ public interface IGregtech_RecipeAdder { boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage); boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, - int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); + int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); + ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU); @Deprecated boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java index 6896d6ffb1..545a97288f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ItemBehaviour.java @@ -19,10 +19,10 @@ public interface Interface_ItemBehaviour { public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - int aSide, float hitX, float hitY, float hitZ); + int aSide, float hitX, float hitY, float hitZ); public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, - int aSide, float hitX, float hitY, float hitZ); + int aSide, float hitX, float hitY, float hitZ); public ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); @@ -39,8 +39,8 @@ public interface Interface_ItemBehaviour { public boolean hasProjectile(Gregtech_MetaItem_Base aItem, SubTag aProjectileType, ItemStack aStack); public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, - double aY, double aZ); + double aY, double aZ); public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, - EntityLivingBase aEntity, float aSpeed); + EntityLivingBase aEntity, float aSpeed); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java index 1a8fdc175c..6ae25525bd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java @@ -17,8 +17,8 @@ public interface Interface_OreRecipeRegistrator { * @param aStack always != null */ public void registerOre(GregtechOrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, - ItemStack aStack); + ItemStack aStack); public void registerOre(GregtechOrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, - ItemStack copyAmount); + ItemStack copyAmount); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java index 79b65051a4..97d952d4a1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java @@ -166,7 +166,7 @@ public interface Interface_ToolStats extends IToolStats { */ @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. @@ -179,14 +179,14 @@ public interface Interface_ToolStats extends IToolStats { */ @Override public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer); + EntityPlayer aPlayer); /** * @return the Damage actually done to the Mob. */ @Override public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, - EntityPlayer aPlayer); + EntityPlayer aPlayer); @Override public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java index 01628d60d0..3ad04ab014 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_Generic_Item.java @@ -44,15 +44,15 @@ public class Gregtech_Generic_Item extends Item implements IProjectileItem { } public Gregtech_Generic_Item(final String aUnlocalized, final String aEnglish, final String aEnglishTooltip, - final boolean aWriteToolTipIntoLangFile) { + final boolean aWriteToolTipIntoLangFile) { super(); this.mName = aUnlocalized; GT_LanguageManager.addStringLocalization(this.mName + ".name", aEnglish); if (GT_Utility.isStringValid(aEnglishTooltip)) { GT_LanguageManager.addStringLocalization( - this.mTooltip = this.mName + ".tooltip_main", - aEnglishTooltip, - aWriteToolTipIntoLangFile); + this.mTooltip = this.mName + ".tooltip_main", + aEnglishTooltip, + aWriteToolTipIntoLangFile); } else { this.mTooltip = null; } @@ -84,7 +84,7 @@ public class Gregtech_Generic_Item extends Item implements IProjectileItem { @Override public boolean doesSneakBypassUse(final World aWorld, final int aX, final int aY, final int aZ, - final EntityPlayer aPlayer) { + final EntityPlayer aPlayer) { return true; } @@ -99,7 +99,7 @@ public class Gregtech_Generic_Item extends Item implements IProjectileItem { @Override public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, - final boolean aF3_H) { + final boolean aF3_H) { if ((this.getMaxDamage() > 0) && !this.getHasSubtypes()) { aList.add((aStack.getMaxDamage() - this.getDamage(aStack)) + " / " + aStack.getMaxDamage()); } @@ -135,13 +135,13 @@ public class Gregtech_Generic_Item extends Item implements IProjectileItem { @Override public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, - final double aX, final double aY, final double aZ) { + final double aX, final double aY, final double aZ) { return null; } @Override public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, - final EntityLivingBase aEntity, final float aSpeed) { + final EntityLivingBase aEntity, final float aSpeed) { return null; } @@ -175,23 +175,30 @@ public class Gregtech_Generic_Item extends Item implements IProjectileItem { @Override public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("LuV")) { + if (stack.getDisplayName() + .contains("LuV")) { HEX_OxFFFFFF = 0xffffcc; - } else if (stack.getDisplayName().contains("ZPM")) { - HEX_OxFFFFFF = 0xace600; - } else if (stack.getDisplayName().contains("UV")) { - HEX_OxFFFFFF = 0xffff00; - } else if (stack.getDisplayName().contains("MAX")) { - HEX_OxFFFFFF = 0xff0000; - } else if (stack.getDisplayName().contains("Sodium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); - } else if (stack.getDisplayName().contains("Cadmium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); - } else if (stack.getDisplayName().contains("Lithium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); - } else { - HEX_OxFFFFFF = 0xffffff; - } + } else if (stack.getDisplayName() + .contains("ZPM")) { + HEX_OxFFFFFF = 0xace600; + } else if (stack.getDisplayName() + .contains("UV")) { + HEX_OxFFFFFF = 0xffff00; + } else if (stack.getDisplayName() + .contains("MAX")) { + HEX_OxFFFFFF = 0xff0000; + } else if (stack.getDisplayName() + .contains("Sodium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); + } else if (stack.getDisplayName() + .contains("Cadmium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); + } else if (stack.getDisplayName() + .contains("Lithium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); + } else { + HEX_OxFFFFFF = 0xffffff; + } return HEX_OxFFFFFF; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java index db41fd1e9f..015ba9d716 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem.java @@ -117,8 +117,8 @@ public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { if (tRandomData instanceof Interface_ItemBehaviour) { this.addItemBehavior( - this.mOffset + aID, - (Interface_ItemBehaviour) tRandomData); + this.mOffset + aID, + (Interface_ItemBehaviour) tRandomData); tUseOreDict = false; } if (tRandomData instanceof IItemContainer) { @@ -185,7 +185,7 @@ public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { * @return the Item itself for convenience in constructing. */ public final Gregtech_MetaItem setElectricStats(final int aMetaValue, final long aMaxCharge, - final long aTransferLimit, final long aTier, final long aSpecialData, final boolean aUseAnimations) { + final long aTransferLimit, final long aTier, final long aSpecialData, final boolean aUseAnimations) { if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length()))) { return this; } @@ -193,12 +193,12 @@ public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { this.mElectricStats.remove((short) aMetaValue); } else { this.mElectricStats.put( - (short) aMetaValue, - new Long[] { aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData }); + (short) aMetaValue, + new Long[] { aMaxCharge, Math.max(0, aTransferLimit), Math.max(-1, aTier), aSpecialData }); if ((aMetaValue >= this.mOffset) && aUseAnimations) { this.mIconList[aMetaValue - this.mOffset] = Arrays.copyOf( - this.mIconList[aMetaValue - this.mOffset], - Math.max(9, this.mIconList[aMetaValue - this.mOffset].length)); + this.mIconList[aMetaValue - this.mOffset], + Math.max(9, this.mIconList[aMetaValue - this.mOffset].length)); } } return this; @@ -216,7 +216,7 @@ public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { * @return the Item itself for convenience in constructing. */ public final Gregtech_MetaItem setFluidContainerStats(final int aMetaValue, final long aCapacity, - final long aStacksize) { + final long aStacksize) { if ((aMetaValue < 0) || (aMetaValue >= (this.mOffset + this.mEnabledItems.length()))) { return this; } @@ -302,10 +302,10 @@ public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { if (this.mEnabledItems.get(i)) { for (byte k = 1; k < this.mIconList[i].length; k++) { this.mIconList[i][k] = aIconRegister - .registerIcon(GTPlusPlus.ID + ":" + this.getUnlocalizedName() + "/" + i + "/" + k); + .registerIcon(GTPlusPlus.ID + ":" + this.getUnlocalizedName() + "/" + i + "/" + k); } this.mIconList[i][0] = aIconRegister - .registerIcon(GTPlusPlus.ID + ":" + this.getUnlocalizedName() + "/" + i); + .registerIcon(GTPlusPlus.ID + ":" + this.getUnlocalizedName() + "/" + i); } } } @@ -337,17 +337,21 @@ public abstract class Gregtech_MetaItem extends Gregtech_MetaItem_Base { @Override public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("LuV")) { + if (stack.getDisplayName() + .contains("LuV")) { HEX_OxFFFFFF = 0xffffcc; - } else if (stack.getDisplayName().contains("ZPM")) { - HEX_OxFFFFFF = 0xace600; - } else if (stack.getDisplayName().contains("UV")) { - HEX_OxFFFFFF = 0xffff00; - } else if (stack.getDisplayName().contains("MAX")) { - HEX_OxFFFFFF = 0xff0000; - } else { - HEX_OxFFFFFF = 0xffffff; - } + } else if (stack.getDisplayName() + .contains("ZPM")) { + HEX_OxFFFFFF = 0xace600; + } else if (stack.getDisplayName() + .contains("UV")) { + HEX_OxFFFFFF = 0xffff00; + } else if (stack.getDisplayName() + .contains("MAX")) { + HEX_OxFFFFFF = 0xff0000; + } else { + HEX_OxFFFFFF = 0xffffff; + } return HEX_OxFFFFFF; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java index e6f7933fd7..3c4418c2bf 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_Base.java @@ -34,7 +34,7 @@ import ic2.api.item.IElectricItemManager; import ic2.api.item.ISpecialElectricItem; public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item - implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { + implements ISpecialElectricItem, IElectricItemManager, IFluidContainerItem { /* ---------- CONSTRUCTOR AND MEMBER VARIABLES ---------- */ private final HashMap>> mItemBehaviors = new HashMap<>(); @@ -61,7 +61,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item * @return the Item itself for convenience in constructing. */ public final Gregtech_MetaItem_Base addItemBehavior(final int aMetaValue, - final Interface_ItemBehaviour aBehavior) { + final Interface_ItemBehaviour aBehavior) { if ((aMetaValue < 0) || (aMetaValue >= 32766) || (aBehavior == null)) { return this; } @@ -81,7 +81,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public boolean hasProjectile(final SubTag aProjectileType, final ItemStack aStack) { final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { if (tBehavior.hasProjectile(this, aProjectileType, aStack)) { @@ -94,9 +94,9 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, - final double aX, final double aY, final double aZ) { + final double aX, final double aY, final double aZ) { final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { final EntityArrow rArrow = tBehavior.getProjectile(this, aProjectileType, aStack, aWorld, aX, aY, aZ); @@ -110,13 +110,13 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public EntityArrow getProjectile(final SubTag aProjectileType, final ItemStack aStack, final World aWorld, - final EntityLivingBase aEntity, final float aSpeed) { + final EntityLivingBase aEntity, final float aSpeed) { final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { final EntityArrow rArrow = tBehavior - .getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); + .getProjectile(this, aProjectileType, aStack, aWorld, aEntity, aSpeed); if (rArrow != null) { return rArrow; } @@ -128,7 +128,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public ItemStack onDispense(final IBlockSource aSource, final ItemStack aStack) { final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { if (tBehavior.canDispense(this, aSource, aStack)) { @@ -142,7 +142,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public boolean isItemStackUsable(final ItemStack aStack) { final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { if (!tBehavior.isItemStackUsable(this, aStack)) { @@ -158,7 +158,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item this.use(aStack, 0, aPlayer); this.isItemStackUsable(aStack); final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { try { @@ -184,11 +184,11 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public boolean onItemUse(final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, - final int aY, final int aZ, final int ordinalSide, final float hitX, final float hitY, final float hitZ) { + final int aY, final int aZ, final int ordinalSide, final float hitX, final float hitY, final float hitZ) { this.use(aStack, 0, aPlayer); this.isItemStackUsable(aStack); final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { try { @@ -214,16 +214,16 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public boolean onItemUseFirst(final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, - final int aY, final int aZ, final int ordinalSide, final float hitX, final float hitY, final float hitZ) { + final int aY, final int aZ, final int ordinalSide, final float hitX, final float hitY, final float hitZ) { this.use(aStack, 0, aPlayer); this.isItemStackUsable(aStack); final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { try { if (tBehavior - .onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, ordinalSide, hitX, hitY, hitZ)) { + .onItemUseFirst(this, aStack, aPlayer, aWorld, aX, aY, aZ, ordinalSide, hitX, hitY, hitZ)) { if (aStack.stackSize <= 0) { aPlayer.destroyCurrentEquippedItem(); } @@ -248,7 +248,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item this.use(aStack, 0, aPlayer); this.isItemStackUsable(aStack); final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { try { @@ -265,9 +265,9 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public final void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, List aList, - final boolean aF3_H) { + final boolean aF3_H) { final String tKey = this.getUnlocalizedName(aStack) + ".tooltip", - tString = GT_LanguageManager.getTranslation(tKey); + tString = GT_LanguageManager.getTranslation(tKey); if (GT_Utility.isStringValid(tString) && !tKey.equals(tString)) { aList.add(tString); } @@ -276,28 +276,26 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item if (tStats != null) { if (tStats[3] > 0) { aList.add( - EnumChatFormatting.AQUA + "Contains " - + GT_Utility.formatNumbers(tStats[3]) - + " EU Tier: " - + (tStats[2] >= 0 ? tStats[2] : 0) - + EnumChatFormatting.GRAY); + EnumChatFormatting.AQUA + "Contains " + + GT_Utility.formatNumbers(tStats[3]) + + " EU Tier: " + + (tStats[2] >= 0 ? tStats[2] : 0) + + EnumChatFormatting.GRAY); } else { final long tCharge = this.getRealCharge(aStack); if ((tStats[3] == -2) && (tCharge <= 0)) { aList.add( - EnumChatFormatting.AQUA + "Empty. You should recycle it properly." - + EnumChatFormatting.GRAY); + EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY); } else { aList.add( - EnumChatFormatting.AQUA + "" - + GT_Utility.formatNumbers(tCharge) - + " / " - + GT_Utility.formatNumbers(Math.abs(tStats[0])) - + " EU - Voltage: " - + GT_Utility.formatNumbers( - V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 - : 1)]) - + EnumChatFormatting.GRAY); + EnumChatFormatting.AQUA + "" + + GT_Utility.formatNumbers(tCharge) + + " / " + + GT_Utility.formatNumbers(Math.abs(tStats[0])) + + " EU - Voltage: " + + GT_Utility.formatNumbers( + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)]) + + EnumChatFormatting.GRAY); } } } @@ -306,19 +304,19 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item if ((tStats != null) && (tStats[0] > 0)) { final FluidStack tFluid = this.getFluidContent(aStack); aList.add( - EnumChatFormatting.BLUE - + ((tFluid == null ? "No Fluids Contained" : GT_Utility.getFluidName(tFluid, true))) - + EnumChatFormatting.GRAY); + EnumChatFormatting.BLUE + + ((tFluid == null ? "No Fluids Contained" : GT_Utility.getFluidName(tFluid, true))) + + EnumChatFormatting.GRAY); aList.add( - EnumChatFormatting.BLUE - + (GT_Utility.formatNumbers(tFluid == null ? 0 : tFluid.amount) + "L / " - + GT_Utility.formatNumbers(tStats[0]) - + "L") - + EnumChatFormatting.GRAY); + EnumChatFormatting.BLUE + + (GT_Utility.formatNumbers(tFluid == null ? 0 : tFluid.amount) + "L / " + + GT_Utility.formatNumbers(tStats[0]) + + "L") + + EnumChatFormatting.GRAY); } final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { aList = tBehavior.getAdditionalToolTips(this, aList, aStack); @@ -330,9 +328,9 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public void onUpdate(final ItemStack aStack, final World aWorld, final Entity aPlayer, final int aTimer, - final boolean aIsInHand) { + final boolean aIsInHand) { final ArrayList> tList = this.mItemBehaviors - .get((short) this.getDamage(aStack)); + .get((short) this.getDamage(aStack)); if (tList != null) { for (final Interface_ItemBehaviour tBehavior : tList) { tBehavior.onUpdate(this, aStack, aWorld, aPlayer, aTimer, aIsInHand); @@ -369,18 +367,18 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public final double charge(final ItemStack aStack, final double aCharge, final int aTier, - final boolean aIgnoreTransferLimit, final boolean aSimulate) { + final boolean aIgnoreTransferLimit, final boolean aSimulate) { final Long[] tStats = this.getElectricStats(aStack); if ((tStats == null) || (tStats[2] > aTier) - || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) - || (aStack.stackSize != 1)) { + || !((tStats[3] == -1) || (tStats[3] == -3) || ((tStats[3] < 0) && (aCharge == Integer.MAX_VALUE))) + || (aStack.stackSize != 1)) { return 0; } - final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = aCharge == Integer.MAX_VALUE - ? Long.MAX_VALUE + final long tChargeBefore = this.getRealCharge(aStack), + tNewCharge = aCharge == Integer.MAX_VALUE ? Long.MAX_VALUE : Math.min( - Math.abs(tStats[0]), - tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + Math.abs(tStats[0]), + tChargeBefore + (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); if (!aSimulate) { this.setCharge(aStack, tNewCharge); } @@ -389,7 +387,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public final double discharge(final ItemStack aStack, final double aCharge, final int aTier, - final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { + final boolean aIgnoreTransferLimit, final boolean aBatteryAlike, final boolean aSimulate) { final Long[] tStats = this.getElectricStats(aStack); if ((tStats == null) || (tStats[2] > aTier)) { return 0; @@ -407,7 +405,7 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item return tStats[3]; } final long tChargeBefore = this.getRealCharge(aStack), tNewCharge = Math - .max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); + .max(0, tChargeBefore - (aIgnoreTransferLimit ? (long) aCharge : Math.min(tStats[1], (long) aCharge))); if (!aSimulate) { this.setCharge(aStack, tNewCharge); } @@ -452,12 +450,12 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item final IElectricItem tArmorItem = (IElectricItem) tArmor.getItem(); if (tArmorItem.canProvideEnergy(tArmor) && (tArmorItem.getTier(tArmor) >= this.getTier(aStack))) { final double tCharge = ElectricItem.manager.discharge( - tArmor, - this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), - Integer.MAX_VALUE, - true, - true, - false); + tArmor, + this.charge(aStack, Integer.MAX_VALUE - 1, Integer.MAX_VALUE, true, true), + Integer.MAX_VALUE, + true, + true, + false); if (tCharge > 0) { this.charge(aStack, tCharge, Integer.MAX_VALUE, true, false); if (aPlayer instanceof EntityPlayer) { @@ -544,15 +542,17 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item final Long[] tStats = this.getFluidContainerStats(aStack); if ((tStats == null) || (tStats[0] <= 0) - || (aFluid == null) - || (aFluid.getFluid().getID() <= 0) - || (aFluid.amount <= 0)) { + || (aFluid == null) + || (aFluid.getFluid() + .getID() <= 0) + || (aFluid.amount <= 0)) { return 0; } FluidStack tFluid = this.getFluidContent(aStack); - if ((tFluid == null) || (tFluid.getFluid().getID() <= 0)) { + if ((tFluid == null) || (tFluid.getFluid() + .getID() <= 0)) { if (aFluid.amount <= tStats[0]) { if (doFill) { this.setFluidContent(aStack, aFluid); @@ -716,23 +716,30 @@ public abstract class Gregtech_MetaItem_Base extends Gregtech_Generic_Item @Override public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("LuV")) { + if (stack.getDisplayName() + .contains("LuV")) { HEX_OxFFFFFF = 0xffffcc; - } else if (stack.getDisplayName().contains("ZPM")) { - HEX_OxFFFFFF = 0xace600; - } else if (stack.getDisplayName().contains("UV")) { - HEX_OxFFFFFF = 0xffff00; - } else if (stack.getDisplayName().contains("MAX")) { - HEX_OxFFFFFF = 0xff0000; - } else if (stack.getDisplayName().contains("Sodium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); - } else if (stack.getDisplayName().contains("Cadmium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); - } else if (stack.getDisplayName().contains("Lithium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); - } else { - HEX_OxFFFFFF = 0xffffff; - } + } else if (stack.getDisplayName() + .contains("ZPM")) { + HEX_OxFFFFFF = 0xace600; + } else if (stack.getDisplayName() + .contains("UV")) { + HEX_OxFFFFFF = 0xffff00; + } else if (stack.getDisplayName() + .contains("MAX")) { + HEX_OxFFFFFF = 0xff0000; + } else if (stack.getDisplayName() + .contains("Sodium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(0, 0, 150); + } else if (stack.getDisplayName() + .contains("Cadmium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(50, 50, 60); + } else if (stack.getDisplayName() + .contains("Lithium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); + } else { + HEX_OxFFFFFF = 0xffffff; + } return HEX_OxFFFFFF; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java index c87b46e696..c04acb9537 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java @@ -62,19 +62,19 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { if (this.doesMaterialAllowGeneration(tPrefix, tMaterial)) { final ItemStack tStack = new ItemStack(this, 1, i); GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName(tStack) + ".name", - this.getDefaultLocalization(tPrefix, tMaterial, i)); + this.getUnlocalizedName(tStack) + ".name", + this.getDefaultLocalization(tPrefix, tMaterial, i)); GT_LanguageManager.addStringLocalization( - this.getUnlocalizedName(tStack) + ".tooltip", - tMaterial.getToolTip(tPrefix.mMaterialAmount / GT_Values.M)); + this.getUnlocalizedName(tStack) + ".tooltip", + tMaterial.getToolTip(tPrefix.mMaterialAmount / GT_Values.M)); if (tPrefix.mIsUnificatable) { GT_OreDictUnificator.set(tPrefix, tMaterial, tStack); } else { GT_OreDictUnificator.registerOre(tPrefix.get(tMaterial), tStack); } if (((tPrefix == OrePrefixes.stick) || (tPrefix == OrePrefixes.wireFine)) - && ((tMaterial == Materials.Lead) || (tMaterial == Materials.Tin) - || (tMaterial == Materials.SolderingAlloy))) { + && ((tMaterial == Materials.Lead) || (tMaterial == Materials.Tin) + || (tMaterial == Materials.SolderingAlloy))) { GregTech_API.sSolderingMetalList.add(tStack); } } @@ -123,9 +123,9 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { */ public final IIconContainer getIconContainer(final int aMetaData, final Materials aMaterial) { return (this.mGeneratedPrefixList[aMetaData / 1000] != null) - && (this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0) - ? aMaterial.mIconSet.mTextures[this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] - : null; + && (this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex >= 0) + ? aMaterial.mIconSet.mTextures[this.mGeneratedPrefixList[aMetaData / 1000].mTextureIndex] + : null; } /** @@ -136,7 +136,7 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { * @return if this Item should be visible in NEI or Creative */ public boolean doesShowInCreative(final OrePrefixes aPrefix, final Materials aMaterial, - final boolean aDoShowAllItems) { + final boolean aDoShowAllItems) { return true; } @@ -160,7 +160,7 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { @Override public final IIconContainer getIconContainer(final int aMetaData) { return GregTech_API.sGeneratedMaterials[aMetaData % 1000] == null ? null - : this.getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]); + : this.getIconContainer(aMetaData, GregTech_API.sGeneratedMaterials[aMetaData % 1000]); } @Override @@ -168,12 +168,12 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { public final void getSubItems(final Item var1, final CreativeTabs aCreativeTab, final List aList) { for (int i = 0; i < 32000; i++) { if (this.doesMaterialAllowGeneration( + this.mGeneratedPrefixList[i / 1000], + GregTech_API.sGeneratedMaterials[i % 1000]) + && this.doesShowInCreative( this.mGeneratedPrefixList[i / 1000], - GregTech_API.sGeneratedMaterials[i % 1000]) - && this.doesShowInCreative( - this.mGeneratedPrefixList[i / 1000], - GregTech_API.sGeneratedMaterials[i % 1000], - GregTech_API.sDoShowAllItemsInCreative)) { + GregTech_API.sGeneratedMaterials[i % 1000], + GregTech_API.sDoShowAllItemsInCreative)) { final ItemStack tStack = new ItemStack(this, 1, i); this.isItemStackUsable(tStack); aList.add(tStack); @@ -206,7 +206,7 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { final int tDamage = this.getDamage(aStack); if ((tDamage < 32000) && (this.mGeneratedPrefixList[tDamage / 1000] != null)) { return Math - .min(super.getItemStackLimit(aStack), this.mGeneratedPrefixList[tDamage / 1000].mDefaultStackSize); + .min(super.getItemStackLimit(aStack), this.mGeneratedPrefixList[tDamage / 1000].mDefaultStackSize); } return super.getItemStackLimit(aStack); } @@ -215,40 +215,52 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { int aMeta = stack.getItemDamage(); - if (stack.getDisplayName().contains("Sodium")) { + if (stack.getDisplayName() + .contains("Sodium")) { HEX_OxFFFFFF = Utils.rgbtoHexValue(90, 90, 255); - } else if (stack.getDisplayName().contains("Cadmium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(150, 150, 80); - } else if (stack.getDisplayName().contains("Lithium")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); - } else if (stack.getDisplayName().contains("Wrought")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); - } else if (stack.getDisplayName().contains("Bronze")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 128, 0); - } else if (stack.getDisplayName().contains("Brass")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 180, 0); - } else if (stack.getDisplayName().contains("Invar")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(180, 180, 120); - } else { - if (aMeta > 50 && aMeta != 150) { - HEX_OxFFFFFF = 0xffffff; - } else if (stack.getDisplayName().contains("ULV")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); - } else if (stack.getDisplayName().contains("LuV")) { - HEX_OxFFFFFF = 0xffffcc; - } else if (stack.getDisplayName().contains("ZPM")) { - HEX_OxFFFFFF = 0xffe600; - } else if (stack.getDisplayName().contains("UV")) { - HEX_OxFFFFFF = 0xffb300; - } else if (stack.getDisplayName().contains("MAX")) { - HEX_OxFFFFFF = Utils.rgbtoHexValue( - MathUtils.randInt(220, 250), - MathUtils.randInt(221, 251), - MathUtils.randInt(220, 250)); - } else { - HEX_OxFFFFFF = 0xffffff; - } - } + } else if (stack.getDisplayName() + .contains("Cadmium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(150, 150, 80); + } else if (stack.getDisplayName() + .contains("Lithium")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(225, 220, 255); + } else if (stack.getDisplayName() + .contains("Wrought")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); + } else if (stack.getDisplayName() + .contains("Bronze")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 128, 0); + } else if (stack.getDisplayName() + .contains("Brass")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(255, 180, 0); + } else if (stack.getDisplayName() + .contains("Invar")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(180, 180, 120); + } else { + if (aMeta > 50 && aMeta != 150) { + HEX_OxFFFFFF = 0xffffff; + } else if (stack.getDisplayName() + .contains("ULV")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); + } else if (stack.getDisplayName() + .contains("LuV")) { + HEX_OxFFFFFF = 0xffffcc; + } else if (stack.getDisplayName() + .contains("ZPM")) { + HEX_OxFFFFFF = 0xffe600; + } else if (stack.getDisplayName() + .contains("UV")) { + HEX_OxFFFFFF = 0xffb300; + } else if (stack.getDisplayName() + .contains("MAX")) { + HEX_OxFFFFFF = Utils.rgbtoHexValue( + MathUtils.randInt(220, 250), + MathUtils.randInt(221, 251), + MathUtils.randInt(220, 250)); + } else { + HEX_OxFFFFFF = 0xffffff; + } + } return HEX_OxFFFFFF; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java index 259aa2760c..fcfa5fae50 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java @@ -43,12 +43,12 @@ import mods.railcraft.api.core.items.IToolCrowbar; * null); */ @Optional.InterfaceList({ - @Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = Mods.Names.FORESTRY), - @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = Mods.Names.RAILCRAFT), - @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"), - @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = Mods.Names.ENDER_I_O) }) + @Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = Mods.Names.FORESTRY), + @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = Mods.Names.RAILCRAFT), + @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"), + @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = Mods.Names.ENDER_I_O) }) public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool - implements IDamagableItem, IToolCrowbar, IToolWrench { + implements IDamagableItem, IToolCrowbar, IToolWrench { /** * All instances of this Item Class are listed here. This gets used to register the Renderer to all Items of this @@ -80,25 +80,24 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool */ @Override public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, - final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, - final byte aMetaData, final int aFortune, final boolean aSilkTouch, - final BlockEvent.HarvestDropsEvent aEvent) { + final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, + final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { final IToolStats tStats = this.getToolStats(aStack); if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { this.doDamage( + aStack, + tStats.convertBlockDrops( + aDrops, aStack, - tStats.convertBlockDrops( - aDrops, - aStack, - aPlayer, - aBlock, - aX, - aY, - aZ, - aMetaData, - aFortune, - aSilkTouch, - aEvent) * tStats.getToolDamagePerDropConversion()); + aPlayer, + aBlock, + aX, + aY, + aZ, + aMetaData, + aFortune, + aSilkTouch, + aEvent) * tStats.getToolDamagePerDropConversion()); } } @@ -113,28 +112,26 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool return true; } if (aEntity.canAttackWithItem() && !aEntity.hitByEntity(aPlayer)) { - final float tMagicDamage = tStats - .getMagicDamageAgainstEntity( - aEntity instanceof EntityLivingBase - ? EnchantmentHelper - .getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) - : 0.0F, - aEntity, - aStack, - aPlayer); + final float tMagicDamage = tStats.getMagicDamageAgainstEntity( + aEntity instanceof EntityLivingBase + ? EnchantmentHelper.getEnchantmentModifierLiving(aPlayer, (EntityLivingBase) aEntity) + : 0.0F, + aEntity, + aStack, + aPlayer); float tDamage = tStats.getNormalDamageAgainstEntity( - (float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() - + this.getToolCombatDamage(aStack), - aEntity, - aStack, - aPlayer); + (float) aPlayer.getEntityAttribute(SharedMonsterAttributes.attackDamage) + .getAttributeValue() + this.getToolCombatDamage(aStack), + aEntity, + aStack, + aPlayer); if ((tDamage + tMagicDamage) > 0.0F) { final boolean tCriticalHit = (aPlayer.fallDistance > 0.0F) && !aPlayer.onGround - && !aPlayer.isOnLadder() - && !aPlayer.isInWater() - && !aPlayer.isPotionActive(Potion.blindness) - && (aPlayer.ridingEntity == null) - && (aEntity instanceof EntityLivingBase); + && !aPlayer.isOnLadder() + && !aPlayer.isInWater() + && !aPlayer.isPotionActive(Potion.blindness) + && (aPlayer.ridingEntity == null) + && (aEntity instanceof EntityLivingBase); if (tCriticalHit && (tDamage > 0.0F)) { tDamage *= 1.5F; } @@ -144,13 +141,13 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool aEntity.setFire(EnchantmentHelper.getFireAspectModifier(aPlayer) * 4); } final int tKnockcack = (aPlayer.isSprinting() ? 1 : 0) + (aEntity instanceof EntityLivingBase - ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) - : 0); + ? EnchantmentHelper.getKnockbackModifier(aPlayer, (EntityLivingBase) aEntity) + : 0); if (tKnockcack > 0) { aEntity.addVelocity( - -MathHelper.sin((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F, - 0.1D, - MathHelper.cos((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F); + -MathHelper.sin((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F, + 0.1D, + MathHelper.cos((aPlayer.rotationYaw * (float) Math.PI) / 180.0F) * tKnockcack * 0.5F); aPlayer.motionX *= 0.6D; aPlayer.motionZ *= 0.6D; aPlayer.setSprinting(false); @@ -173,7 +170,7 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool aPlayer.addStat(StatList.damageDealtStat, Math.round(tDamage * 10.0F)); } aEntity.hurtResistantTime = Math - .max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); + .max(1, tStats.getHurtResistanceTime(aEntity.hurtResistantTime, aEntity)); aPlayer.addExhaustion(0.3F); this.doDamage(aStack, tStats.getToolDamagePerEntityAttack()); } @@ -203,87 +200,86 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool if (tStats != null) { final String name = aStack.getUnlocalizedName(); if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") - || name.equals("gt.metatool.01.174") - || name.equals("gt.metatool.01.176")) { + || name.equals("gt.metatool.01.174") + || name.equals("gt.metatool.01.176")) { aList.add( - tOffset + 0, - EnumChatFormatting.WHITE + "Durability: " - + EnumChatFormatting.GREEN - + (tMaxDamage - getToolDamage(aStack)) - + " / " - + tMaxDamage - + EnumChatFormatting.GRAY); + tOffset + 0, + EnumChatFormatting.WHITE + "Durability: " + + EnumChatFormatting.GREEN + + (tMaxDamage - getToolDamage(aStack)) + + " / " + + tMaxDamage + + EnumChatFormatting.GRAY); aList.add( - tOffset + 1, - EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName - + EnumChatFormatting.YELLOW - + " lvl " - + this.getHarvestLevel(aStack, "") - + EnumChatFormatting.GRAY); + tOffset + 1, + EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + + EnumChatFormatting.YELLOW + + " lvl " + + this.getHarvestLevel(aStack, "") + + EnumChatFormatting.GRAY); aList.add( - tOffset + 2, - EnumChatFormatting.WHITE + "Turbine Efficency: " - + EnumChatFormatting.BLUE - + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) - + EnumChatFormatting.GRAY); + tOffset + 2, + EnumChatFormatting.WHITE + "Turbine Efficency: " + + EnumChatFormatting.BLUE + + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) + + EnumChatFormatting.GRAY); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Optimal Steam flow: " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) - + EnumChatFormatting.GRAY - + "L/sec"); + tOffset + 3, + EnumChatFormatting.WHITE + "Optimal Steam flow: " + + EnumChatFormatting.LIGHT_PURPLE + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + + EnumChatFormatting.GRAY + + "L/sec"); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 25) - + EnumChatFormatting.GRAY - + "EU/t"); + tOffset + 3, + EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + + EnumChatFormatting.LIGHT_PURPLE + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 25) + + EnumChatFormatting.GRAY + + "EU/t"); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) - + EnumChatFormatting.GRAY - + "EU/t"); + tOffset + 3, + EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + + EnumChatFormatting.LIGHT_PURPLE + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + + EnumChatFormatting.GRAY + + "EU/t"); } else { aList.add( - tOffset + 0, - EnumChatFormatting.WHITE + "Durability: " - + EnumChatFormatting.GREEN - + (tMaxDamage - getToolDamage(aStack)) - + " / " - + tMaxDamage - + EnumChatFormatting.GRAY); + tOffset + 0, + EnumChatFormatting.WHITE + "Durability: " + + EnumChatFormatting.GREEN + + (tMaxDamage - getToolDamage(aStack)) + + " / " + + tMaxDamage + + EnumChatFormatting.GRAY); aList.add( - tOffset + 1, - EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName - + EnumChatFormatting.YELLOW - + " lvl " - + this.getHarvestLevel(aStack, "") - + EnumChatFormatting.GRAY); + tOffset + 1, + EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + + EnumChatFormatting.YELLOW + + " lvl " + + this.getHarvestLevel(aStack, "") + + EnumChatFormatting.GRAY); aList.add( - tOffset + 2, - EnumChatFormatting.WHITE + "Attack Damage: " - + EnumChatFormatting.BLUE - + this.getToolCombatDamage(aStack) - + EnumChatFormatting.GRAY); + tOffset + 2, + EnumChatFormatting.WHITE + "Attack Damage: " + + EnumChatFormatting.BLUE + + this.getToolCombatDamage(aStack) + + EnumChatFormatting.GRAY); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Mining Speed: " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) - + EnumChatFormatting.GRAY); + tOffset + 3, + EnumChatFormatting.WHITE + "Mining Speed: " + + EnumChatFormatting.LIGHT_PURPLE + + Math + .max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + + EnumChatFormatting.GRAY); } } } @@ -298,93 +294,93 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool if (tStats != null) { final String name = aStack.getUnlocalizedName(); if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") - || name.equals("gt.metatool.01.174") - || name.equals("gt.metatool.01.176")) { + || name.equals("gt.metatool.01.174") + || name.equals("gt.metatool.01.176")) { aList.add( - tOffset + 0, - EnumChatFormatting.WHITE + "Durability: " - + EnumChatFormatting.GREEN - + (tMaxDamage - getToolDamage(aStack)) - + " / " - + tMaxDamage - + EnumChatFormatting.GRAY); + tOffset + 0, + EnumChatFormatting.WHITE + "Durability: " + + EnumChatFormatting.GREEN + + (tMaxDamage - getToolDamage(aStack)) + + " / " + + tMaxDamage + + EnumChatFormatting.GRAY); aList.add( - tOffset + 1, - EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName - + EnumChatFormatting.YELLOW - + " lvl " - + this.getHarvestLevel(aStack, "") - + EnumChatFormatting.GRAY); + tOffset + 1, + EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + + EnumChatFormatting.YELLOW + + " lvl " + + this.getHarvestLevel(aStack, "") + + EnumChatFormatting.GRAY); aList.add( - tOffset + 2, - EnumChatFormatting.WHITE + "Turbine Efficency: " - + EnumChatFormatting.BLUE - + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) - + EnumChatFormatting.GRAY); + tOffset + 2, + EnumChatFormatting.WHITE + "Turbine Efficency: " + + EnumChatFormatting.BLUE + + (50.0F + (10.0F * this.getToolCombatDamage(aStack))) + + EnumChatFormatting.GRAY); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Optimal Steam flow: " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) - + EnumChatFormatting.GRAY - + "L/sec"); + tOffset + 3, + EnumChatFormatting.WHITE + "Optimal Steam flow: " + + EnumChatFormatting.LIGHT_PURPLE + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + + EnumChatFormatting.GRAY + + "L/sec"); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 50) - + EnumChatFormatting.GRAY - + "EU/t"); + tOffset + 3, + EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + + EnumChatFormatting.LIGHT_PURPLE + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 50) + + EnumChatFormatting.GRAY + + "EU/t"); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) - + EnumChatFormatting.GRAY - + "EU/t"); + tOffset + 3, + EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + + EnumChatFormatting.LIGHT_PURPLE + + Math.max( + Float.MIN_NORMAL, + tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + + EnumChatFormatting.GRAY + + "EU/t"); } else { aList.add( - tOffset + 0, - EnumChatFormatting.WHITE + "Durability: " - + EnumChatFormatting.GREEN - + (tMaxDamage - getToolDamage(aStack)) - + " / " - + tMaxDamage - + EnumChatFormatting.GRAY); + tOffset + 0, + EnumChatFormatting.WHITE + "Durability: " + + EnumChatFormatting.GREEN + + (tMaxDamage - getToolDamage(aStack)) + + " / " + + tMaxDamage + + EnumChatFormatting.GRAY); aList.add( - tOffset + 1, - EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName - + EnumChatFormatting.YELLOW - + " lvl " - + this.getHarvestLevel(aStack, "") - + EnumChatFormatting.GRAY); + tOffset + 1, + EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + + EnumChatFormatting.YELLOW + + " lvl " + + this.getHarvestLevel(aStack, "") + + EnumChatFormatting.GRAY); aList.add( - tOffset + 2, - EnumChatFormatting.WHITE + "Attack Damage: " - + EnumChatFormatting.BLUE - + this.getToolCombatDamage(aStack) - + EnumChatFormatting.GRAY); + tOffset + 2, + EnumChatFormatting.WHITE + "Attack Damage: " + + EnumChatFormatting.BLUE + + this.getToolCombatDamage(aStack) + + EnumChatFormatting.GRAY); aList.add( - tOffset + 3, - EnumChatFormatting.WHITE + "Mining Speed: " - + EnumChatFormatting.LIGHT_PURPLE - + Math.max( - Float.MIN_NORMAL, - tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) - + EnumChatFormatting.GRAY); + tOffset + 3, + EnumChatFormatting.WHITE + "Mining Speed: " + + EnumChatFormatting.LIGHT_PURPLE + + Math + .max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + + EnumChatFormatting.GRAY); NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag("GT.ToolStats"); if ((aNBT != null) && aNBT.hasKey("Heat")) { int tHeat = aNBT.getInteger("Heat"); - final long tWorldTime = aPlayer.getEntityWorld().getWorldTime(); + final long tWorldTime = aPlayer.getEntityWorld() + .getWorldTime(); if (aNBT.hasKey("HeatTime")) { final long tHeatTime = aNBT.getLong("HeatTime"); if (tWorldTime > (tHeatTime + 10)) { @@ -400,11 +396,11 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool } aList.add( - tOffset + 3, - EnumChatFormatting.RED + "Heat: " - + aNBT.getInteger("Heat") - + " K" - + EnumChatFormatting.GRAY); + tOffset + 3, + EnumChatFormatting.RED + "Heat: " + + aNBT.getInteger("Heat") + + " K" + + EnumChatFormatting.GRAY); } } } @@ -423,7 +419,7 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool aNBT = aNBT.getCompoundTag("GT.ToolStats"); if ((aNBT != null) && aNBT.getBoolean("Electric")) { return new Long[] { aNBT.getLong("MaxCharge"), aNBT.getLong("Voltage"), aNBT.getLong("Tier"), - aNBT.getLong("SpecialData") }; + aNBT.getLong("SpecialData") }; } } return new Long[] {}; @@ -448,13 +444,13 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool return 0.0F; } return tStats.isMinableBlock(aBlock, (byte) aMetaData) - ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) - : 0.0F; + ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) + : 0.0F; } @Override public boolean onBlockDestroyed(final ItemStack aStack, final World aWorld, final Block aBlock, final int aX, - final int aY, final int aZ, final EntityLivingBase aPlayer) { + final int aY, final int aZ, final EntityLivingBase aPlayer) { if (!this.isItemStackUsable(aStack)) { return false; } @@ -464,8 +460,8 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool } GT_Utility.doSoundAtClient(tStats.getMiningSound(), 1, 1.0F); this.doDamage( - aStack, - (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); + aStack, + (int) Math.max(1, aBlock.getBlockHardness(aWorld, aX, aY, aZ) * tStats.getToolDamagePerBlockBreak())); return this.getDigSpeed(aStack, aBlock, aWorld.getBlockMetadata(aX, aY, aZ)) > 0.0F; } @@ -496,7 +492,7 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool @Override public boolean canWhack(final EntityPlayer aPlayer, final ItemStack aStack, final int aX, final int aY, - final int aZ) { + final int aZ) { if (!this.isItemStackUsable(aStack)) { return false; } @@ -620,13 +616,13 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool if (tLevels[i] > 0) { final Integer tLevel = tMap.get(tEnchants[i].effectId); tMap.put( - tEnchants[i].effectId, - tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); + tEnchants[i].effectId, + tLevel == null ? tLevels[i] : tLevel == tLevels[i] ? tLevel + 1 : Math.max(tLevel, tLevels[i])); } } for (final Entry tEntry : tMap.entrySet()) { if ((tEntry.getKey() == 33) || ((tEntry.getKey() == 20) && (tEntry.getValue() > 2)) - || (tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId)) { + || (tEntry.getKey() == Enchantment_Radioactivity.INSTANCE.effectId)) { tResult.put(tEntry.getKey(), tEntry.getValue()); } else { switch (Enchantment.enchantmentsList[tEntry.getKey()].type) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java index 687ea4429f..3009c80c80 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java @@ -45,12 +45,12 @@ public class GT_MetaTileEntity_ChiselBus extends GT_MetaTileEntity_Hatch_InputBu @Override public String[] getDescription() { return new String[] { "Item Input Bus for Industrial Chisel", getSlots(this.mTier) - 1 + " + 1 " + " Slots", - "Added by: " + EnumChatFormatting.AQUA - + "Quetz4l" - + " - " - + EnumChatFormatting.RED - + "[GT++]" - + EnumChatFormatting.RESET }; + "Added by: " + EnumChatFormatting.AQUA + + "Quetz4l" + + " - " + + EnumChatFormatting.RED + + "[GT++]" + + EnumChatFormatting.RESET }; } @Override @@ -61,13 +61,18 @@ public class GT_MetaTileEntity_ChiselBus extends GT_MetaTileEntity_Hatch_InputBu int columnsToMake = Math.min(inventoryHandler.getSlots() - row * 4, 4); for (int column = 0; column < columnsToMake; column++) { scrollable.widget( - new SlotWidget(inventoryHandler, slotIndex++).setPos(column * 18, row * 18).setSize(18, 18)); + new SlotWidget(inventoryHandler, slotIndex++).setPos(column * 18, row * 18) + .setSize(18, 18)); } } - builder.widget(scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 7)); // main slots - builder.widget(new SlotWidget(inventoryHandler, slotIndex).setPos(18, 18).setSize(18, 18)); // slot for target + builder.widget( + scrollable.setSize(18 * 4 + 4, 18 * 4) + .setPos(52, 7)); // main slots + builder.widget( + new SlotWidget(inventoryHandler, slotIndex).setPos(18, 18) + .setSize(18, 18)); // slot for target } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java index 7ceae20109..bab504910e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java @@ -13,12 +13,12 @@ import gtPlusPlus.core.util.minecraft.FluidUtils; public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_FluidGenerator { public GT_MetaTileEntity_Hatch_AirIntake(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -38,7 +38,8 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_F @Override public Fluid getFluidToGenerate() { - return FluidUtils.getAir(1).getFluid(); + return FluidUtils.getAir(1) + .getFluid(); } @Override @@ -58,12 +59,16 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_F @Override public boolean doesHatchMeetConditionsToGenerate() { - return this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()); + return this.getBaseMetaTileEntity() + .getAirAtSide( + this.getBaseMetaTileEntity() + .getFrontFacing()); } @Override public void generateParticles(World aWorld, String name) { - if (this.getBaseMetaTileEntity().isServerSide()) { + if (this.getBaseMetaTileEntity() + .isServerSide()) { return; } final float ran1 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); @@ -96,28 +101,28 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_F } aWorld.spawnParticle( - name, - (double) (xPos + ran1 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) xSpd, - (double) -ySpd, - (double) zSpd); + name, + (double) (xPos + ran1 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) xSpd, + (double) -ySpd, + (double) zSpd); aWorld.spawnParticle( - name, - (double) (xPos + ran2 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) xSpd, - (double) -ySpd, - (double) zSpd); + name, + (double) (xPos + ran2 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) xSpd, + (double) -ySpd, + (double) zSpd); aWorld.spawnParticle( - name, - (double) (xPos + ran3 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) xSpd, - (double) -ySpd, - (double) zSpd); + name, + (double) (xPos + ran3 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) xSpd, + (double) -ySpd, + (double) zSpd); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java index 235354f396..007310fc06 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java @@ -7,22 +7,22 @@ import gregtech.api.metatileentity.MetaTileEntity; public class GT_MetaTileEntity_Hatch_AirIntake_Extreme extends GT_MetaTileEntity_Hatch_AirIntake { public GT_MetaTileEntity_Hatch_AirIntake_Extreme(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_AirIntake_Extreme(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Hatch_AirIntake_Extreme( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override 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 1811ee6183..f375900800 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 @@ -11,12 +11,12 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatch_Dynamo { public GT_MetaTileEntity_Hatch_DynamoBuffer(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_DynamoBuffer(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -49,8 +49,8 @@ public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatc public String[] getDescription() { String[] g; 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() }; + "Does not accept more than " + (this.maxEUOutput() * this.maxAmperesIn()) + "EU/t as input", + CORE.GT_Tooltip.get() }; return g; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java index 2d534a493d..336c6eb011 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java @@ -26,26 +26,26 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileEntity_Hatch - implements IConfigurationCircuitSupport { + implements IConfigurationCircuitSupport { public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 17, - new String[] { "Holds Data Orbs for the Elemental Duplicator", "Can insert/extract the circuit slot", - "A circuit must be used to select a slot (1-16)", CORE.GT_Tooltip.get() }); + aID, + aName, + aNameRegional, + aTier, + 17, + new String[] { "Holds Data Orbs for the Elemental Duplicator", "Can insert/extract the circuit slot", + "A circuit must be used to select a slot (1-16)", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 17, aDescription, aTextures); } public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 17, aDescription, aTextures); } @@ -126,10 +126,10 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { Logger.INFO("Checking if we can pull " + aStack.getDisplayName() + " from slot " + aIndex); if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) - && side == getBaseMetaTileEntity().getFrontFacing()) { + && side == getBaseMetaTileEntity().getFrontFacing()) { return true; } return false; @@ -137,10 +137,10 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { Logger.INFO("Checking if we can put " + aStack.getDisplayName() + " into slot " + aIndex); if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) - && side == getBaseMetaTileEntity().getFrontFacing()) { + && side == getBaseMetaTileEntity().getFrontFacing()) { return true; } return false; @@ -172,7 +172,8 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int ordinalSide) { if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) - && ordinalSide == getBaseMetaTileEntity().getFrontFacing().ordinal()) { + && ordinalSide == getBaseMetaTileEntity().getFrontFacing() + .ordinal()) { Logger.INFO("Putting " + aStack.getDisplayName() + " into slot " + aIndex); return true; } @@ -216,11 +217,13 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15) - .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DATA_ORB) - .applyForWidget( - widget -> widget - .setFilter(stack -> ItemList.Tool_DataOrb.isStackEqual(stack, false, true))) - .build().setPos(52, 7)); + SlotGroup.ofItemHandler(inventoryHandler, 4) + .startFromSlot(0) + .endAtSlot(15) + .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .applyForWidget( + widget -> widget.setFilter(stack -> ItemList.Tool_DataOrb.isStackEqual(stack, false, true))) + .build() + .setPos(52, 7)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java index e50ec67d80..b4e213e829 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java @@ -26,12 +26,12 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile public int mProgresstime = 0, mMaxProgresstime = 0; public GT_MetaTileEntity_Hatch_FluidGenerator(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_FluidGenerator(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -60,13 +60,13 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; } @Override @@ -93,12 +93,12 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile public abstract MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity); public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return false; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return false; } @@ -160,8 +160,12 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile } int aFillAmount = this.fill(FluidUtils.getFluidStack(getFluidToGenerate(), getAmountOfFluidToGenerate()), true); if (aFillAmount > 0) { - if (this.getBaseMetaTileEntity().isClientSide()) { - generateParticles(this.getBaseMetaTileEntity().getWorld(), "cloud"); + if (this.getBaseMetaTileEntity() + .isClientSide()) { + generateParticles( + this.getBaseMetaTileEntity() + .getWorld(), + "cloud"); } } return aFillAmount > 0; @@ -184,14 +188,13 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile @Override public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid == null || aFluid.getFluid().getID() <= 0 - || aFluid.amount <= 0 - || aFluid.getFluid() != getFluidToGenerate() - || !canTankBeFilled()) { + if (aFluid == null || aFluid.getFluid() + .getID() <= 0 || aFluid.amount <= 0 || aFluid.getFluid() != getFluidToGenerate() || !canTankBeFilled()) { return 0; } - if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) { + if (getFillableStack() == null || getFillableStack().getFluid() + .getID() <= 0) { if (aFluid.amount <= getCapacity()) { if (doFill) { setFillableStack(aFluid.copy()); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java index 46d6917beb..c55ddda47d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java @@ -34,7 +34,7 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc } public GT_MetaTileEntity_Hatch_InputBattery(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 4 : 16, aDescription, aTextures); } @@ -131,17 +131,17 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity mMetaTileEntity) { if (mMetaTileEntity.rechargerSlotCount() > 0 && aBaseMetaTileEntity.getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), - k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (aBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { for (int u = 0; u < 10; u++) { aBaseMetaTileEntity.decreaseStoredEnergyUnits( - GT_ModHandler.chargeElectricItem( - mMetaTileEntity.mInventory[i], - (int) Math.min(V[this.mTier] * 15, aBaseMetaTileEntity.getStoredEU()), - (int) Math.min(Integer.MAX_VALUE, GT_Values.V[u]), - false, - false), - true); + GT_ModHandler.chargeElectricItem( + mMetaTileEntity.mInventory[i], + (int) Math.min(V[this.mTier] * 15, aBaseMetaTileEntity.getStoredEU()), + (int) Math.min(Integer.MAX_VALUE, GT_Values.V[u]), + false, + false), + true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) { mMetaTileEntity.mInventory[i] = null; } @@ -163,31 +163,31 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc protected void fillStacksIntoFirstSlots() { for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); - } + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); + } } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } @Override @@ -223,8 +223,8 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { if (mTier == 2) { for (int i = 0; i < 4; i++) { - builder.widget( - new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); + builder + .widget(new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); } } else { for (int i = 0; i < 16; i++) { 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 5c209f2252..a3261af6f6 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 @@ -52,17 +52,17 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 1, aDescription, aTextures); } final String[] mDescription = new String[] { "Outputs pollution from a multiblock", "DO NOT OBSTRUCT THE OUTPUT!", - "Requires 3 Air Blocks in front of the exhaust face", - mTier < 5 ? "Requires an Air Filter" - : "Requires an Air Filter " + EnumChatFormatting.WHITE + "[Tier 2]" + EnumChatFormatting.GRAY, - "Can take Air Filters from an input bus of the multiblock", - "Reduces Pollution to " + calculatePollutionReduction(100, true) + "%", - "Recovers " + (100 - calculatePollutionReduction(100, true)) + "% of CO2/CO/SO2", CORE.GT_Tooltip.get() }; + "Requires 3 Air Blocks in front of the exhaust face", + mTier < 5 ? "Requires an Air Filter" + : "Requires an Air Filter " + EnumChatFormatting.WHITE + "[Tier 2]" + EnumChatFormatting.GRAY, + "Can take Air Filters from an input bus of the multiblock", + "Reduces Pollution to " + calculatePollutionReduction(100, true) + "%", + "Recovers " + (100 - calculatePollutionReduction(100, true)) + "% of CO2/CO/SO2", CORE.GT_Tooltip.get() }; @Override public String[] getDescription() { @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return (aIndex == this.SLOT_FILTER && isAirFilter(aStack)); } @@ -152,7 +152,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch IGregTechTileEntity bmte = getBaseMetaTileEntity(); ForgeDirection facing = bmte.getFrontFacing(); return bmte.getAirAtSide(facing) && bmte.getAirAtSideAndDistance(facing, 1) - && bmte.getAirAtSideAndDistance(facing, 2); + && bmte.getAirAtSideAndDistance(facing, 2); } /** @@ -249,14 +249,18 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isClientSide()) { - if (this.getBaseMetaTileEntity().isActive()) { + if (this.getBaseMetaTileEntity() + .isActive()) { String aParticleName; if ((aTick % 2) == 0) { aParticleName = "cloud"; } else { aParticleName = "smoke"; } - this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); + this.pollutionParticles( + this.getBaseMetaTileEntity() + .getWorld(), + aParticleName); } } } @@ -306,35 +310,35 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch if (chk1) { aWorld.spawnParticle( - name, - (double) (xPos + ran1 * 0.5F), - (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) xSpd, - (double) ySpd, - (double) zSpd); + name, + (double) (xPos + ran1 * 0.5F), + (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) xSpd, + (double) ySpd, + (double) zSpd); } if (chk2) { aWorld.spawnParticle( - name, - (double) (xPos + ran2 * 0.5F), - (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) xSpd, - (double) ySpd, - (double) zSpd); + name, + (double) (xPos + ran2 * 0.5F), + (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) xSpd, + (double) ySpd, + (double) zSpd); } if (chk3) { aWorld.spawnParticle( - name, - (double) (xPos + ran3 * 0.5F), - (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) xSpd, - (double) ySpd, - (double) zSpd); + name, + (double) (xPos + ran3 * 0.5F), + (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) xSpd, + (double) ySpd, + (double) zSpd); } } @@ -349,16 +353,18 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch @Override public GUITextureSet getGUITextureSet() { return new GUITextureSet().setMainBackground(GTPP_UITextures.BACKGROUND_YELLOW) - .setItemSlot(GTPP_UITextures.SLOT_ITEM_YELLOW).setTitleTab( - GTPP_UITextures.TAB_TITLE_YELLOW, - GTPP_UITextures.TAB_TITLE_DARK_YELLOW, - GTPP_UITextures.TAB_TITLE_ANGULAR_YELLOW); + .setItemSlot(GTPP_UITextures.SLOT_ITEM_YELLOW) + .setTitleTab( + GTPP_UITextures.TAB_TITLE_YELLOW, + GTPP_UITextures.TAB_TITLE_DARK_YELLOW, + GTPP_UITextures.TAB_TITLE_ANGULAR_YELLOW); } @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - new SlotWidget(inventoryHandler, 0).setFilter(stack -> stack.getItem() instanceof ItemAirFilter) - .setBackground(getGUITextureSet().getItemSlot()).setPos(79, 34)); + new SlotWidget(inventoryHandler, 0).setFilter(stack -> stack.getItem() instanceof ItemAirFilter) + .setBackground(getGUITextureSet().getItemSlot()) + .setPos(79, 34)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java index 232d8a8c55..ad94907d4c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java @@ -32,7 +32,7 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public GT_MetaTileEntity_Hatch_Naquadah(final String aName, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, 6, aDescription[0], aTextures); mFluidCapacity = 32000; initHatch(); @@ -53,21 +53,22 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { if (side == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { for (FluidStack f : mFluidsToUse) { if (f != null) { - if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f.getFluid()) { + if (GT_Utility.getFluidForFilledItem(aStack, true) + .getFluid() == f.getFluid()) { return true; } } @@ -113,8 +114,8 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In String aEnrNaq = aDescCache[1]; String aNaquad = aDescCache[2]; String[] s2 = new String[] { "Fluid Input for Multiblocks", "Capacity: " + getCapacity() + "L", - "Accepted Fluid: " + aNaq, "Accepted Fluid: " + aEnrNaq, "Accepted Fluid: " + aNaquad, - CORE.GT_Tooltip.get() }; + "Accepted Fluid: " + aNaq, "Accepted Fluid: " + aEnrNaq, "Accepted Fluid: " + aNaquad, + CORE.GT_Tooltip.get() }; return s2; } @@ -124,7 +125,8 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In FluidStack mLockedStack = f; Integer mLockedTemp = 0;; String mTempMod = "" + EnumChatFormatting.RESET; - mLockedTemp = mLockedStack.getFluid().getTemperature(); + mLockedTemp = mLockedStack.getFluid() + .getTemperature(); if (mLockedTemp != null) { if (mLockedTemp <= -3000) { mTempMod = "" + EnumChatFormatting.DARK_PURPLE; @@ -160,7 +162,7 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, - int aColorIndex, boolean aActive, boolean aRedstone) { + int aColorIndex, boolean aActive, boolean aRedstone) { byte a1 = 0, a2 = 0; try { if (F1 == null) { @@ -183,19 +185,19 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In if (side == ForgeDirection.UP || side == ForgeDirection.DOWN) { ITexture g = textureIndex > 0 ? BlockIcons.casingTexturePages[a2][texturePointer] - : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; + : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; return new ITexture[] { g, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; } return side != facing - ? (textureIndex > 0 ? new ITexture[] { BlockIcons.casingTexturePages[a2][texturePointer] } - : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) - : (textureIndex > 0 - ? (aActive ? this.getTexturesActive(BlockIcons.casingTexturePages[a2][texturePointer]) - : this.getTexturesInactive(BlockIcons.casingTexturePages[a2][texturePointer])) - : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) - : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); + ? (textureIndex > 0 ? new ITexture[] { BlockIcons.casingTexturePages[a2][texturePointer] } + : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) + : (textureIndex > 0 + ? (aActive ? this.getTexturesActive(BlockIcons.casingTexturePages[a2][texturePointer]) + : this.getTexturesInactive(BlockIcons.casingTexturePages[a2][texturePointer])) + : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) + : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java index f70be9aa89..58dc7ec380 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java @@ -30,7 +30,7 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat } public GT_MetaTileEntity_Hatch_OutputBattery(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); } @@ -115,13 +115,13 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == aBaseMetaTileEntity.getFrontFacing(); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == aBaseMetaTileEntity.getFrontFacing(); } @@ -134,17 +134,17 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat protected void fillStacksIntoFirstSlots() { for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); - } + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); + } } @Override @@ -176,23 +176,22 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat if (aBaseMetaTileEntity.isServerSide()) { if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity mMetaTileEntity) { if (mMetaTileEntity.dechargerSlotCount() > 0 - && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { + && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), - k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null - && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { + && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { aBaseMetaTileEntity.increaseStoredEnergyUnits( - GT_ModHandler.dischargeElectricItem( - mMetaTileEntity.mInventory[i], - (int) Math.min( - V[mTier] * 15, - aBaseMetaTileEntity.getEUCapacity() - - aBaseMetaTileEntity.getStoredEU()), - (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), - true, - false, - false), - true); + GT_ModHandler.dischargeElectricItem( + mMetaTileEntity.mInventory[i], + (int) Math.min( + V[mTier] * 15, + aBaseMetaTileEntity.getEUCapacity() - aBaseMetaTileEntity.getStoredEU()), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), + true, + false, + false), + true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } } @@ -211,8 +210,8 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { if (mTier == 2) { for (int i = 0; i < 4; i++) { - builder.widget( - new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); + builder + .widget(new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); } } else { for (int i = 0; i < 16; i++) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java index 6945e4928d..bfe8290240 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java @@ -13,12 +13,12 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_Reservoir extends GT_MetaTileEntity_Hatch_FluidGenerator { public GT_MetaTileEntity_Hatch_Reservoir(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_Reservoir(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java index d8811a72f7..94c28877d8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java @@ -24,20 +24,20 @@ public class GT_MetaTileEntity_Hatch_Solidifier extends GT_MetaTileEntity_Hatch_ @Override public String[] getDescription() { return new String[] { - "Fluid Input with Mold for " + EnumChatFormatting.YELLOW - + "Large Processing Factory" - + EnumChatFormatting.RESET, - "#22 Circuit is imprinted in Hatch", "Capacity: " + GT_Utility.formatNumbers(getCapacity()) + "L", - "Added by: " + EnumChatFormatting.AQUA - + "Quetz4l" - + " - " - + EnumChatFormatting.RED - + "[GT++]" - + EnumChatFormatting.RESET }; + "Fluid Input with Mold for " + EnumChatFormatting.YELLOW + + "Large Processing Factory" + + EnumChatFormatting.RESET, + "#22 Circuit is imprinted in Hatch", "Capacity: " + GT_Utility.formatNumbers(getCapacity()) + "L", + "Added by: " + EnumChatFormatting.AQUA + + "Quetz4l" + + " - " + + EnumChatFormatting.RED + + "[GT++]" + + EnumChatFormatting.RESET }; } public GT_MetaTileEntity_Hatch_Solidifier(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, getSlots(aTier), aTier, aDescription, aTextures); } @@ -53,7 +53,9 @@ public class GT_MetaTileEntity_Hatch_Solidifier extends GT_MetaTileEntity_Hatch_ @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { super.addUIWidgets(builder, buildContext); - builder.widget(new SlotWidget(inventoryHandler, moldSlot).setPos(125, 35).setSize(18, 18)); + builder.widget( + new SlotWidget(inventoryHandler, moldSlot).setPos(125, 35) + .setSize(18, 18)); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java index 0122b1b0c8..5cc1e64d13 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java @@ -31,38 +31,38 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public GT_MetaTileEntity_Hatch_Steam_BusInput(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - getSlots(aTier), - new String[] { "Item Input for Steam Multiblocks", - "Shift + right click with screwdriver to toggle automatic item shuffling", "Capacity: 4 stacks", - "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); + aID, + aName, + aNameRegional, + aTier, + getSlots(aTier), + new String[] { "Item Input for Steam Multiblocks", + "Shift + right click with screwdriver to toggle automatic item shuffling", "Capacity: 4 stacks", + "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override @@ -116,16 +116,16 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha } else { for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } } @@ -146,23 +146,23 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha if (aPlayer.isSneaking()) { disableSort = !disableSort; GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("200.1", "Automatic Item Shuffling: ") - + (disableSort ? GT_Utility.trans("087", "Disabled") : GT_Utility.trans("088", "Enabled"))); + aPlayer, + GT_Utility.trans("200.1", "Automatic Item Shuffling: ") + + (disableSort ? GT_Utility.trans("087", "Disabled") : GT_Utility.trans("088", "Enabled"))); } } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } @Override @@ -189,84 +189,82 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[] { - new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + return new ITexture[] { new GT_RenderedTexture( + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[] { - new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + return new ITexture[] { new GT_RenderedTexture( + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java index 962d4d2f3e..1d4dbc8987 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java @@ -25,37 +25,37 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public GT_MetaTileEntity_Hatch_Steam_BusOutput(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 4, - new String[] { "Item Output for Steam Multiblocks", "Does not automatically export items", - "Capacity: 4 stacks", "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); + aID, + aName, + aNameRegional, + aTier, + 4, + new String[] { "Item Output for Steam Multiblocks", "Does not automatically export items", + "Capacity: 4 stacks", "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT), TextureFactory.of(ITEM_OUT_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_OUT) }; } @Override @@ -91,13 +91,13 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == aBaseMetaTileEntity.getFrontFacing(); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @@ -125,84 +125,82 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[] { - new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + return new ITexture[] { new GT_RenderedTexture( + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[] { - new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + return new ITexture[] { new GT_RenderedTexture( + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java index 0d307f6e0f..ed3101f309 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -57,13 +57,13 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { @Override public String[] getDescription() { return ArrayUtils.addAll( - this.mDescriptionArray, - "Right Click with a soldering iron to reset controller link", - "Right Click with a wrench to remove turbine", - "Right Click with a screwdriver for technical information", - "Sneak + Right Click with a wrench to rotate", - "Sneak + Right Click with a screwdriver to disable animations", - CORE.GT_Tooltip.get()); + this.mDescriptionArray, + "Right Click with a soldering iron to reset controller link", + "Right Click with a wrench to remove turbine", + "Right Click with a screwdriver for technical information", + "Sneak + Right Click with a wrench to rotate", + "Sneak + Right Click with a screwdriver to disable animations", + CORE.GT_Tooltip.get()); } @Override @@ -142,13 +142,13 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @@ -165,9 +165,9 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { if (hasTurbine() && MathUtils.randInt(0, 1) == 0) { ItemStack aTurbine = getTurbine(); ((GT_MetaGenerated_Tool) aTurbine.getItem()).doDamage( - aTurbine, - (long) getDamageToComponent(aTurbine) * (long) Math - .min((float) aEUt / (float) damageFactorLow, Math.pow(aEUt, damageFactorHigh))); + aTurbine, + (long) getDamageToComponent(aTurbine) + * (long) Math.min((float) aEUt / (float) damageFactorLow, Math.pow(aEUt, damageFactorHigh))); } } @@ -195,9 +195,11 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { if (this.mHasController) { if (aTick % 20 == 0) { if (isControllerActive()) { - this.getBaseMetaTileEntity().setActive(true); + this.getBaseMetaTileEntity() + .setActive(true); } else { - this.getBaseMetaTileEntity().setActive(false); + this.getBaseMetaTileEntity() + .setActive(false); } } } else if (!this.mHasController && this.mControllerLocation != null) { @@ -227,9 +229,9 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { if (p != null) { // Logger.INFO(p.getLocationString()); IGregTechTileEntity tTileEntity = getBaseMetaTileEntity() - .getIGregTechTileEntity(p.xPos, p.yPos, p.zPos); + .getIGregTechTileEntity(p.xPos, p.yPos, p.zPos); if (tTileEntity != null - && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_LargerTurbineBase) { + && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_LargerTurbineBase) { return (GregtechMetaTileEntity_LargerTurbineBase) tTileEntity.getMetaTileEntity(); } else { if (tTileEntity == null) { @@ -272,7 +274,8 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { private ITexture getFrontFacingTurbineTexture() { if (!mHasController) { - return this.getBaseMetaTileEntity().isActive() ? new GT_RenderedTexture(LARGETURBINE_ST_ACTIVE5) + return this.getBaseMetaTileEntity() + .isActive() ? new GT_RenderedTexture(LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(LARGETURBINE_ST5); } else { if (usingAnimations()) { @@ -305,7 +308,8 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { } public void setActive(boolean b) { - this.getBaseMetaTileEntity().setActive(b); + this.getBaseMetaTileEntity() + .setActive(b); } @Override @@ -320,16 +324,20 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { PlayerUtils.messagePlayer(aPlayer, "Has Controller? " + this.mHasController); if (mHasController) { PlayerUtils.messagePlayer( - aPlayer, - "Controller Location: " + BlockPos.generateBlockPos(mControllerLocation).getLocationString()); + aPlayer, + "Controller Location: " + BlockPos.generateBlockPos(mControllerLocation) + .getLocationString()); PlayerUtils.messagePlayer(aPlayer, "Controller Active? " + this.isControllerActive()); } - PlayerUtils.messagePlayer(aPlayer, "Active? " + this.getBaseMetaTileEntity().isActive()); + PlayerUtils.messagePlayer( + aPlayer, + "Active? " + this.getBaseMetaTileEntity() + .isActive()); PlayerUtils.messagePlayer(aPlayer, "Has Turbine inserted? " + this.hasTurbine()); if (this.hasTurbine()) { Materials aMat = GT_MetaGenerated_Tool.getPrimaryMaterial(getTurbine()); String aSize = GregtechMetaTileEntity_LargerTurbineBase - .getTurbineSizeString(GregtechMetaTileEntity_LargerTurbineBase.getTurbineSize(getTurbine())); + .getTurbineSizeString(GregtechMetaTileEntity_LargerTurbineBase.getTurbineSize(getTurbine())); PlayerUtils.messagePlayer(aPlayer, "Using: " + aMat.mLocalizedName + " " + aSize); } } else { @@ -344,8 +352,9 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { @Override public boolean onWrenchRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, float aX, - float aY, float aZ) { - if (this.getBaseMetaTileEntity().isServerSide() && !aPlayer.isSneaking()) { + float aY, float aZ) { + if (this.getBaseMetaTileEntity() + .isServerSide() && !aPlayer.isSneaking()) { ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if (tCurrentItem != null) { if (tCurrentItem.getItem() instanceof GT_MetaGenerated_Tool) { @@ -358,8 +367,9 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { @Override public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { - if (this.getBaseMetaTileEntity().isServerSide()) { + float aX, float aY, float aZ) { + if (this.getBaseMetaTileEntity() + .isServerSide()) { ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); if (tCurrentItem != null) { if (tCurrentItem.getItem() instanceof GT_MetaGenerated_Tool) { @@ -375,7 +385,7 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { boolean aHasTurbine = this.hasTurbine(); if (aPlayer.inventory.getFirstEmptyStack() >= 0 && aHasTurbine) { if (PlayerUtils.isCreative(aPlayer) - || GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { + || GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { aPlayer.inventory.addItemStackToInventory((this.getTurbine())); this.mInventory[0] = null; GT_Utility.sendChatToPlayer(aPlayer, "Removed turbine with wrench."); @@ -383,25 +393,25 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { } } else { GT_Utility.sendChatToPlayer( - aPlayer, - aHasTurbine ? "Cannot remove turbine, no free inventory space." : "No turbine to remove."); + aPlayer, + aHasTurbine ? "Cannot remove turbine, no free inventory space." : "No turbine to remove."); } } else if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSolderingToolList)) { if (mControllerLocation != null && mControllerLocation.length() > 0) { if (setController(BlockPos.generateBlockPos(mControllerLocation))) { if (PlayerUtils.isCreative(aPlayer) - || GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { + || GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { String tChat = "Trying to Reset linked Controller"; IGregTechTileEntity g = this.getBaseMetaTileEntity(); GT_Utility.sendChatToPlayer(aPlayer, tChat); GT_Utility.sendSoundToPlayers( - g.getWorld(), - SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, - 1.0F, - -1, - g.getXCoord(), - g.getYCoord(), - g.getZCoord()); + g.getWorld(), + SoundResource.IC2_TOOLS_RUBBER_TRAMPOLINE, + 1.0F, + -1, + g.getXCoord(), + g.getYCoord(), + g.getZCoord()); return true; } } @@ -418,7 +428,8 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - new SlotWidget(inventoryHandler, 0).setFilter(GregtechMetaTileEntity_LargerTurbineBase::isValidTurbine) - .setAccess(false, true).setPos(79, 34)); + new SlotWidget(inventoryHandler, 0).setFilter(GregtechMetaTileEntity_LargerTurbineBase::isValidTurbine) + .setAccess(false, true) + .setPos(79, 34)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java index e6cb5f8132..e9626a310c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java @@ -31,26 +31,26 @@ public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_H } public GT_MetaTileEntity_Hatch_TurbineProvider(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Hatch_TurbineProvider( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override public String[] getDescription() { return new String[] { "An automation port for Large Turbines", - "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine", - "You may adjust this with a screwdriver", "Hold shift to adjust in finer amounts", - "Hold control to adjust direction", "Left Click with Screwdriver to reset", - "This module assumes the entire turbine is in the same Chunk", CORE.GT_Tooltip.get() }; + "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine", + "You may adjust this with a screwdriver", "Hold shift to adjust in finer amounts", + "Hold control to adjust direction", "Left Click with Screwdriver to reset", + "This module assumes the entire turbine is in the same Chunk", CORE.GT_Tooltip.get() }; } private GT_MetaTileEntity_LargeTurbine mParent = null; @@ -58,7 +58,8 @@ public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_H @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { super.onPostTick(aBaseMetaTileEntity, aTimer); - if (aTimer % mRefreshTime == 0 && this.getBaseMetaTileEntity().isServerSide()) { + if (aTimer % mRefreshTime == 0 && this.getBaseMetaTileEntity() + .isServerSide()) { tryRefillTurbine(); } } @@ -132,13 +133,13 @@ public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_H @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return isItemStackTurbine(aStack); } @@ -213,7 +214,8 @@ public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_H @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - new SlotWidget(inventoryHandler, 0).setFilter(GregtechMetaTileEntity_LargerTurbineBase::isValidTurbine) - .setAccess(false, true).setPos(79, 34)); + new SlotWidget(inventoryHandler, 0).setFilter(GregtechMetaTileEntity_LargerTurbineBase::isValidTurbine) + .setAccess(false, true) + .setPos(79, 34)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java index ac6cb4319a..5794e6adf8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In @Override public String[] getDescription() { return new String[] { "Item Input for Multiblocks", "" + getSlots(this.mTier) + " Slots", - CORE.GT_Tooltip.get() }; + CORE.GT_Tooltip.get() }; } @Override @@ -54,10 +54,12 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In int columnsToMake = Math.min(inventoryHandler.getSlots() - row * 4, 4); for (int column = 0; column < columnsToMake; column++) { scrollable.widget( - new SlotWidget(inventoryHandler, row * 4 + column).setPos(column * 18, row * 18) - .setSize(18, 18)); + new SlotWidget(inventoryHandler, row * 4 + column).setPos(column * 18, row * 18) + .setSize(18, 18)); } } - builder.widget(scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 7)); + builder.widget( + scrollable.setSize(18 * 4 + 4, 18 * 4) + .setPos(52, 7)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java index e109d065bd..aee6235ab9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java @@ -65,16 +65,16 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O for (int i = 0; i < this.mInventory.length; ++i) { for (int j = i + 1; j < this.mInventory.length; ++j) { if (this.mInventory[j] != null && (this.mInventory[i] == null - || GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j]))) { + || GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j]))) { GT_Utility.moveStackFromSlotAToSlotB( - (IInventory) this.getBaseMetaTileEntity(), - (IInventory) this.getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + (IInventory) this.getBaseMetaTileEntity(), + (IInventory) this.getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } } } @@ -83,7 +83,7 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O @Override public String[] getDescription() { String[] aDesc = new String[] { "Item Output for Multiblocks", "" + getSlots(this.mTier) + " Slots", - CORE.GT_Tooltip.get() }; + CORE.GT_Tooltip.get() }; return aDesc; } @@ -94,10 +94,12 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O int columnsToMake = Math.min(inventoryHandler.getSlots() - row * 4, 4); for (int column = 0; column < columnsToMake; column++) { scrollable.widget( - new SlotWidget(inventoryHandler, row * 4 + column).setPos(column * 18, row * 18) - .setSize(18, 18)); + new SlotWidget(inventoryHandler, row * 4 + column).setPos(column * 18, row * 18) + .setSize(18, 18)); } } - builder.widget(scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 7)); + builder.widget( + scrollable.setSize(18 * 4 + 4, 18 * 4) + .setPos(52, 7)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java index 67fbb22e92..e9f9a2dda4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntityFluid.java @@ -17,17 +17,17 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid { public final GT_Materials mMaterial; public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, - GT_Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { + GT_Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof) { this(aID, aName, aNameRegional, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); } public GregtechMetaPipeEntityFluid(final String aName, final float aThickNess, final GT_Materials aMaterial, - final int aCapacity, final int aHeatResistance, final boolean aGasProof) { + final int aCapacity, final int aHeatResistance, final boolean aGasProof) { this(aName, aThickNess, aMaterial, aCapacity, aHeatResistance, aGasProof, 1); } public GregtechMetaPipeEntityFluid(int aID, String aName, String aNameRegional, float aThickNess, - GT_Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { + GT_Materials aMaterial, int aCapacity, int aHeatResistance, boolean aGasProof, int aFluidTypes) { super(aID, aName, aNameRegional, aThickNess, null, aCapacity, aHeatResistance, aGasProof, aFluidTypes); this.mLastReceivedFrom = 0; this.oLastReceivedFrom = 0; @@ -35,7 +35,7 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid { } public GregtechMetaPipeEntityFluid(String aName, float aThickNess, GT_Materials aMaterial, int aCapacity, - int aHeatResistance, boolean aGasProof, int aFluidTypes) { + int aHeatResistance, boolean aGasProof, int aFluidTypes) { super(aName, aThickNess, null, aCapacity, aHeatResistance, aGasProof, aFluidTypes); this.mLastReceivedFrom = 0; this.oLastReceivedFrom = 0; @@ -45,33 +45,33 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid { @Override public byte getTileEntityBaseType() { return this.mMaterial == null ? 4 - : (byte) ((this.mMaterial.contains(SubTag.WOOD) ? 12 : 4) - + Math.max(0, Math.min(3, this.mMaterial.mToolQuality))); + : (byte) ((this.mMaterial.contains(SubTag.WOOD) ? 12 : 4) + + Math.max(0, Math.min(3, this.mMaterial.mToolQuality))); } @Override public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new GregtechMetaPipeEntityFluid( - this.mName, - this.mThickNess, - this.mMaterial, - this.mCapacity, - this.mHeatResistance, - this.mGasProof); + this.mName, + this.mThickNess, + this.mMaterial, + this.mCapacity, + this.mHeatResistance, + this.mGasProof); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, int aConnections, - int aColorIndex, boolean aConnected, boolean aRedstone) { + int aColorIndex, boolean aConnected, boolean aRedstone) { float tThickNess = getThickNess(); if (mDisableInput == 0) return new ITexture[] { aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) - : TextureFactory.of( - mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], - Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) }; + : TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)) }; int tMask = 0; int[][] sRestrictionArray = { { 2, 3, 5, 4 }, { 2, 3, 5, 4 }, { 1, 0, 5, 4 }, { 1, 0, 4, 5 }, { 1, 0, 2, 3 }, - { 1, 0, 2, 3 } }; + { 1, 0, 2, 3 } }; if (side != ForgeDirection.UNKNOWN) { for (int i = 0; i < 4; i++) if (isInputDisabledAtSide(ForgeDirection.getOrientation(sRestrictionArray[side.ordinal()][i]))) @@ -81,37 +81,37 @@ public class GregtechMetaPipeEntityFluid extends GT_MetaPipeEntity_Fluid { if (tMask > 3 && tMask < 12) tMask = (tMask ^ 12); } return new ITexture[] { aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) - : TextureFactory.of( - mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], - Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), - getRestrictorTexture(tMask) }; + : TextureFactory.of( + mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), + getRestrictorTexture(tMask) }; } protected static ITexture getBaseTexture(float aThickNess, int aPipeAmount, GT_Materials aMaterial, - int aColorIndex) { + int aColorIndex) { if (aPipeAmount >= 9) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aPipeAmount >= 4) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.124F) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.374F) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.499F) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.749F) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); if (aThickNess < 0.874F) return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); return TextureFactory.of( - aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], - Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); + aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], + Dyes.getModulation(aColorIndex, aMaterial.mRGBa)); } } 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 334eea41f1..9b1408ba51 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 @@ -21,7 +21,8 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem static { try { INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GT_Utility - .getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS").get(null); + .getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS") + .get(null); } catch (IllegalAccessException | NullPointerException e) { throw new Error(e); } @@ -30,74 +31,74 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem private short[] vRGB = null; public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, - final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, - final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { + final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, + final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { super( - aID, - aName, - aNameRegional, - aThickNess, - aMaterial, - aCableLossPerMeter, - aAmperage, - aVoltage, - aInsulated, - aCanShock); + aID, + aName, + aNameRegional, + aThickNess, + aMaterial, + aCableLossPerMeter, + aAmperage, + aVoltage, + aInsulated, + aCanShock); this.vRGB = aRGB == null || aRGB.length != 4 ? Materials.Iron.mRGBa : aRGB; } public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final Materials aMaterial, - final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, - final boolean aCanShock, final short[] aRGB) { + final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, + final boolean aCanShock, final short[] aRGB) { super(aName, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); this.vRGB = aRGB == null || aRGB.length != 4 ? Materials.Iron.mRGBa : aRGB; } public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, - final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, - final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { + final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, + final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { this( - aID, - aName, - aNameRegional, - aThickNess, - null, - aCableLossPerMeter, - aAmperage, - aVoltage, - aInsulated, - aCanShock, - aRGB); + aID, + aName, + aNameRegional, + aThickNess, + null, + aCableLossPerMeter, + aAmperage, + aVoltage, + aInsulated, + aCanShock, + aRGB); } public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final long aCableLossPerMeter, - final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, - final short[] aRGB) { + final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, + final short[] aRGB) { this(aName, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock, aRGB); } @Override public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new GregtechMetaPipeEntity_Cable( - this.mName, - this.mThickNess, - this.mMaterial, - this.mCableLossPerMeter, - this.mAmperage, - this.mVoltage, - this.mInsulated, - this.mCanShock, - this.vRGB); + this.mName, + this.mThickNess, + this.mMaterial, + this.mCableLossPerMeter, + this.mAmperage, + this.mVoltage, + this.mInsulated, + this.mCanShock, + this.vRGB); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, int aConnections, - int aColorIndex, boolean aConnected, boolean aRedstone) { + int aColorIndex, boolean aConnected, boolean aRedstone) { return getTextureGTNH(aBaseMetaTileEntity, side, aConnections, aColorIndex, aConnected, aRedstone); } private ITexture[] getTextureGTNH(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection aSide, int aConnections, - int aColorIndex, boolean aConnected, boolean aRedstone) { + int aColorIndex, boolean aConnected, boolean aRedstone) { Materials wireMaterial = mMaterial; if (wireMaterial == null) { @@ -105,51 +106,51 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem } if (!mInsulated) return new ITexture[] { new GT_RenderedTexture( - wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - Dyes.getModulation(aColorIndex, vRGB)) }; + wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], + Dyes.getModulation(aColorIndex, 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)) }; + Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.374F) // 0.375 x1 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_TINY, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( + Textures.BlockIcons.INSULATION_TINY, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.499F) // 0.500 x2 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_SMALL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( + Textures.BlockIcons.INSULATION_SMALL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.624F) // 0.625 x4 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_MEDIUM, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( + Textures.BlockIcons.INSULATION_MEDIUM, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.749F) // 0.750 x8 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( - INSULATION_MEDIUM_PLUS, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( + INSULATION_MEDIUM_PLUS, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.874F) // 0.825 x12 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_LARGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; - return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_HUGE, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + Textures.BlockIcons.INSULATION_LARGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + return new ITexture[] { + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( + Textures.BlockIcons.INSULATION_HUGE, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } return new ITexture[] { new GT_RenderedTexture( - Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + Textures.BlockIcons.INSULATION_FULL, + Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java index 627ef2d65b..0aaaa75584 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaTreeFarmerStructural.java @@ -12,23 +12,23 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines public class GregtechMetaTreeFarmerStructural extends GregtechMetaTreeFarmerBase { public GregtechMetaTreeFarmerStructural(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier, 0, "Structural Blocks for the Tree Farmer."); } public GregtechMetaTreeFarmerStructural(final String aName, final int aTier, final int aInvSlotCount, - final String[] aDescription, final ITexture[][][] aTextures) { + final String[] aDescription, final ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @Override public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new GregtechMetaTreeFarmerStructural( - this.mName, - this.mTier, - this.mInventory.length, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mInventory.length, + this.mDescriptionArray, + this.mTextures); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java index 8848319d75..6a85c06c1b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java @@ -31,27 +31,27 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H protected String mTempMod = null; public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final int aID, final String aName, - final String aNameRegional) { + final String aNameRegional) { super( - aID, - aName, - aNameRegional, - 6, - 3, - new String[] { "Fluid Input for Multiblocks", "Capacity: " + GT_Utility.formatNumbers(aAmount) + "L" }); + aID, + aName, + aNameRegional, + 6, + 3, + new String[] { "Fluid Input for Multiblocks", "Capacity: " + GT_Utility.formatNumbers(aAmount) + "L" }); this.mLockedFluid = aFluid; this.mFluidCapacity = aAmount; } public GT_MetaTileEntity_Hatch_CustomFluidBase(Fluid aFluid, int aAmount, final String aName, - final String[] aDescription, final ITexture[][][] aTextures) { + final String[] aDescription, final ITexture[][][] aTextures) { super(aName, 6, 3, aDescription[0], aTextures); this.mLockedFluid = aFluid; this.mFluidCapacity = aAmount; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { if (side == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { FluidStack fs = GT_Utility.getFluidForFilledItem(aStack, true); return fs != null && fs.getFluid() == this.mLockedFluid; @@ -61,22 +61,22 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == aBaseMetaTileEntity.getFrontFacing() && aIndex == 1; } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(FLUID_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override @@ -178,25 +178,28 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H aColour = EnumChatFormatting.RED; } String aFluidName = "Accepted Fluid: " + aColour - + (mLockedStack != null ? mLockedStack.getLocalizedName() : "Empty") - + EnumChatFormatting.RESET; + + (mLockedStack != null ? mLockedStack.getLocalizedName() : "Empty") + + EnumChatFormatting.RESET; return new String[] { "Fluid Input for " + (isSteam ? "Steam " : "") + "Multiblocks", - "Capacity: " + getCapacity() + "L", aFluidName, CORE.GT_Tooltip.get() }; + "Capacity: " + getCapacity() + "L", aFluidName, CORE.GT_Tooltip.get() }; } @Override public boolean isFluidInputAllowed(final FluidStack aFluid) { - return this.mLockedFluid.getName().equals(aFluid.getFluid().getName()); + return this.mLockedFluid.getName() + .equals( + aFluid.getFluid() + .getName()); } @Override public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Hatch_CustomFluidBase( - this.mLockedFluid, - this.mFluidCapacity, - this.mName, - this.mDescriptionArray, - this.mTextures); + this.mLockedFluid, + this.mFluidCapacity, + this.mName, + this.mDescriptionArray, + this.mTextures); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java index b727c0d84a..e260347ca5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTileEntity.java @@ -23,7 +23,7 @@ public abstract class GregtechMetaTileEntity extends MetaTileEntity { public final ITexture[][][] mTextures; public GregtechMetaTileEntity(final int aID, final String aName, final String aNameRegional, final int aTier, - final int aInvSlotCount, final String aDescription, final ITexture... aTextures) { + final int aInvSlotCount, final String aDescription, final ITexture... aTextures) { super(aID, aName, aNameRegional, aInvSlotCount); this.mTier = (byte) Math.max(0, Math.min(aTier, 9)); this.mDescription = aDescription; @@ -37,7 +37,7 @@ public abstract class GregtechMetaTileEntity extends MetaTileEntity { } public GregtechMetaTileEntity(final String aName, final int aTier, final int aInvSlotCount, - final String aDescription, final ITexture[][][] aTextures) { + final String aDescription, final ITexture[][][] aTextures) { super(aName, aInvSlotCount); this.mTier = (byte) aTier; this.mDescription = aDescription; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java index 3701f5dd0f..c6a088fb1c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java @@ -52,29 +52,29 @@ public class GregtechMetaTransformerHiAmp extends GT_MetaTileEntity_Transformer ITexture[][][] rTextures = new ITexture[12][17][]; for (byte i = -1; i < 16; i++) { rTextures[0][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; + Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; rTextures[1][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; + Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; rTextures[2][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; + Textures.BlockIcons.OVERLAYS_ENERGY_OUT[mTier] }; rTextures[3][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier + 1] }; + Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier + 1] }; rTextures[4][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier + 1] }; + Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier + 1] }; rTextures[5][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier + 1] }; + Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier + 1] }; rTextures[6][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] }; + Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] }; rTextures[7][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] }; + Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] }; rTextures[8][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] }; + Textures.BlockIcons.OVERLAYS_ENERGY_IN[mTier] }; rTextures[9][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier + 1] }; + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier + 1] }; rTextures[10][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier + 1] }; + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier + 1] }; rTextures[11][i + 1] = new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][i + 1], - Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier + 1] }; + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier + 1] }; } return rTextures; } @@ -87,10 +87,10 @@ public class GregtechMetaTransformerHiAmp extends GT_MetaTileEntity_Transformer @Override public String[] getDescription() { return ArrayUtils.addAll( - this.mDescriptionArray, - "Accepts 4A and outputs 16A", - "Toggle 2A/8A half-mode with Screwdriver", - CORE.GT_Tooltip.get()); + this.mDescriptionArray, + "Accepts 4A and outputs 16A", + "Toggle 2A/8A half-mode with Screwdriver", + CORE.GT_Tooltip.get()); } @Override 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 079b90f81c..e756a92343 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 @@ -97,7 +97,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEn // GregtechMeta_MultiBlockBase without generic parameter public abstract class GregtechMeta_MultiBlockBase> - extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase { + extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase { public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; @@ -123,7 +123,8 @@ public abstract class GregtechMeta_MultiBlockBase e) { - int tMaxStackSize = e.getKey().getMaxStackSize(); + int tMaxStackSize = e.getKey() + .getMaxStackSize(); int tStackSize = e.getValue(); return (tStackSize + tMaxStackSize - 1) / tMaxStackSize; } @@ -145,7 +146,8 @@ public abstract class GregtechMeta_MultiBlockBase mInfo = new ArrayList<>(); - if (!this.getMetaName().equals("")) { + if (!this.getMetaName() + .equals("")) { mInfo.add(this.getMetaName()); } @@ -164,7 +166,7 @@ public abstract class GregtechMeta_MultiBlockBase 0) { mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage") + ":"); mInfo.add( - StatCollector.translateToLocal( - "" + EnumChatFormatting.RED + (-lEUt) + EnumChatFormatting.RESET + " EU/t")); + StatCollector + .translateToLocal("" + EnumChatFormatting.RED + (-lEUt) + EnumChatFormatting.RESET + " EU/t")); } else { mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.generation") + ":"); mInfo.add( - StatCollector.translateToLocal( - "" + EnumChatFormatting.GREEN + lEUt + EnumChatFormatting.RESET + " EU/t")); + StatCollector + .translateToLocal("" + EnumChatFormatting.GREEN + lEUt + EnumChatFormatting.RESET + " EU/t")); } mInfo.add( - StatCollector.translateToLocal("GTPP.multiblock.problems") + ": " - + EnumChatFormatting.RED - + (getIdealStatus() - getRepairStatus()) - + EnumChatFormatting.RESET - + " " - + StatCollector.translateToLocal("GTPP.multiblock.efficiency") - + ": " - + EnumChatFormatting.YELLOW - + Float.toString(mEfficiency / 100.0F) - + EnumChatFormatting.RESET - + " %"); + StatCollector.translateToLocal("GTPP.multiblock.problems") + ": " + + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " " + + StatCollector.translateToLocal("GTPP.multiblock.efficiency") + + ": " + + EnumChatFormatting.YELLOW + + Float.toString(mEfficiency / 100.0F) + + EnumChatFormatting.RESET + + " %"); if (this.getPollutionPerSecond(null) > 0) { int mPollutionReduction = getPollutionReductionForAllMufflers(); mInfo.add( - StatCollector.translateToLocal("GTPP.multiblock.pollution") + ": " - + EnumChatFormatting.RED - + this.getPollutionPerSecond(null) - + EnumChatFormatting.RESET - + "/sec"); + StatCollector.translateToLocal("GTPP.multiblock.pollution") + ": " + + EnumChatFormatting.RED + + this.getPollutionPerSecond(null) + + EnumChatFormatting.RESET + + "/sec"); mInfo.add( - StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced") + ": " - + EnumChatFormatting.GREEN - + mPollutionReduction - + EnumChatFormatting.RESET - + " %"); + StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced") + ": " + + EnumChatFormatting.GREEN + + mPollutionReduction + + EnumChatFormatting.RESET + + " %"); } mInfo.add( - StatCollector.translateToLocal("GTPP.CC.parallel") + ": " - + EnumChatFormatting.GREEN - + (getMaxParallelRecipes()) - + EnumChatFormatting.RESET); + StatCollector.translateToLocal("GTPP.CC.parallel") + ": " + + EnumChatFormatting.GREEN + + (getMaxParallelRecipes()) + + EnumChatFormatting.RESET); mInfo.add( - "Total Time Since Built: " + EnumChatFormatting.DARK_GREEN - + Integer.toString(weeks) - + EnumChatFormatting.RESET - + " Weeks, " - + EnumChatFormatting.DARK_GREEN - + Integer.toString(days) - + EnumChatFormatting.RESET - + " Days, "); + "Total Time Since Built: " + EnumChatFormatting.DARK_GREEN + + Integer.toString(weeks) + + EnumChatFormatting.RESET + + " Weeks, " + + EnumChatFormatting.DARK_GREEN + + Integer.toString(days) + + EnumChatFormatting.RESET + + " Days, "); mInfo.add( - EnumChatFormatting.DARK_GREEN + Long.toString(hours) - + EnumChatFormatting.RESET - + " Hours, " - + EnumChatFormatting.DARK_GREEN - + Long.toString(minutes) - + EnumChatFormatting.RESET - + " Minutes, " - + EnumChatFormatting.DARK_GREEN - + Long.toString(second) - + EnumChatFormatting.RESET - + " Seconds."); + EnumChatFormatting.DARK_GREEN + Long.toString(hours) + + EnumChatFormatting.RESET + + " Hours, " + + EnumChatFormatting.DARK_GREEN + + Long.toString(minutes) + + EnumChatFormatting.RESET + + " Minutes, " + + EnumChatFormatting.DARK_GREEN + + Long.toString(second) + + EnumChatFormatting.RESET + + " Seconds."); mInfo.add("Total Time in ticks: " + EnumChatFormatting.DARK_GREEN + Long.toString(this.mTotalRunTime)); String[] mInfo2 = mInfo.toArray(new String[mInfo.size()]); @@ -312,7 +314,8 @@ public abstract class GregtechMeta_MultiBlockBase localIterator = this.mChargeHatches - .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { tTileEntity = localIterator.next(); } tTileEntity = null; for (final Iterator localIterator = this.mDischargeHatches - .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { tTileEntity = localIterator.next(); } tTileEntity = null; for (final Iterator localIterator = this.mTecTechDynamoHatches - .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { tTileEntity = localIterator.next(); } tTileEntity = null; for (final Iterator localIterator = this.mTecTechEnergyHatches - .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() - .doExplosion(gregtech.api.enums.GT_Values.V[8])) { + .iterator(); localIterator.hasNext(); tTileEntity.getBaseMetaTileEntity() + .doExplosion(gregtech.api.enums.GT_Values.V[8])) { tTileEntity = localIterator.next(); } @@ -491,7 +502,8 @@ public abstract class GregtechMeta_MultiBlockBase aHatches, - int aAmount) { + int aAmount) { for (final GT_MetaTileEntity_Hatch_CustomFluidBase tHatch : filterValidMTEs(aHatches)) { FluidStack tLiquid = tHatch.getFluid(); if (tLiquid == null || tLiquid.amount < aAmount) { @@ -540,7 +552,8 @@ public abstract class GregtechMeta_MultiBlockBase { this.mWrench = false; b = true; @@ -580,7 +593,7 @@ public abstract class GregtechMeta_MultiBlockBase 0 ? !mMufflerHatches.isEmpty() : true); + && (this.getPollutionPerSecond(null) > 0 ? !mMufflerHatches.isEmpty() : true); } @Override @@ -596,12 +609,12 @@ public abstract class GregtechMeta_MultiBlockBase boolean addToMachineListInternal(ArrayList aList, final IGregTechTileEntity aTileEntity, - final int aBaseCasingIndex) { + final int aBaseCasingIndex) { return addToMachineListInternal(aList, getMetaTileEntity(aTileEntity), aBaseCasingIndex); } public boolean addToMachineListInternal(ArrayList aList, final IMetaTileEntity aTileEntity, - final int aBaseCasingIndex) { + final int aBaseCasingIndex) { if (aTileEntity == null) { return false; } @@ -629,9 +642,9 @@ public abstract class GregtechMeta_MultiBlockBase mDynamoClass; mDynamoClass = ReflectionUtils - .getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti"); + .getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti"); if (mDynamoClass != null) { if (mDynamoClass.isInstance(aMetaTileEntity)) { return true; @@ -1038,7 +1051,7 @@ public abstract class GregtechMeta_MultiBlockBase mDynamoClass; mDynamoClass = ReflectionUtils - .getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti"); + .getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti"); if (mDynamoClass != null) { if (mDynamoClass.isInstance(aMetaTileEntity)) { return true; @@ -1098,9 +1111,10 @@ public abstract class GregtechMeta_MultiBlockBase allowed = getAllowedVoidingModes(); setVoidingMode(getVoidingMode().nextInCollection(allowed)); GT_Utility.sendChatToPlayer( - aPlayer, - StatCollector.translateToLocal("GT5U.gui.button.voiding_mode") + " " - + StatCollector.translateToLocal(getVoidingMode().getTransKey())); + aPlayer, + StatCollector.translateToLocal("GT5U.gui.button.voiding_mode") + " " + + StatCollector.translateToLocal(getVoidingMode().getTransKey())); return true; } else return super.onSolderingToolRightClick(side, wrenchingSide, aPlayer, aX, aY, aZ); } @@ -1210,7 +1225,7 @@ public abstract class GregtechMeta_MultiBlockBase IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheMeta, - Function aGetTheMeta, int maxMeta) { + Function aGetTheMeta, int maxMeta) { return addTieredBlock(aBlock, (t, i) -> { aSetTheMeta.accept(t, i); return true; @@ -1223,7 +1238,7 @@ public abstract class GregtechMeta_MultiBlockBase IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheMeta, - Function aGetTheMeta, int minMeta, int maxMeta) { + Function aGetTheMeta, int minMeta, int maxMeta) { return addTieredBlock(aBlock, (t, i) -> { aSetTheMeta.accept(t, i); return true; @@ -1236,7 +1251,7 @@ public abstract class GregtechMeta_MultiBlockBase IStructureElement addTieredBlock(Block aBlock, BiPredicate aSetTheMeta, - Function aGetTheMeta, int minMeta, int maxMeta) { + Function aGetTheMeta, int minMeta, int maxMeta) { return new IStructureElement<>() { @@ -1277,13 +1292,13 @@ public abstract class GregtechMeta_MultiBlockBase mToolStacks.get(mWrench + "WRENCH")).asWidget().setPos(156, 58)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mWrench, val -> mWrench = val)); - builder.widget(new ItemDrawable(() -> mToolStacks.get(mCrowbar + "CROWBAR")).asWidget().setPos(156, 76)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mCrowbar, val -> mCrowbar = val)); - builder.widget(new ItemDrawable(() -> mToolStacks.get(mHardHammer + "HARDHAMMER")).asWidget().setPos(156, 94)) - .widget(new TextWidget("H").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(167, 103)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mHardHammer, val -> mHardHammer = val)); - builder.widget(new ItemDrawable(() -> mToolStacks.get(mSoftHammer + "SOFTHAMMER")).asWidget().setPos(156, 112)) - .widget(new TextWidget("M").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(167, 121)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mSoftHammer, val -> mSoftHammer = val)); builder.widget( - new ItemDrawable(() -> mToolStacks.get(mScrewdriver + "SCREWDRIVER")).asWidget().setPos(156, 130)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mScrewdriver, val -> mScrewdriver = val)); + new ItemDrawable(() -> mToolStacks.get(mWrench + "WRENCH")).asWidget() + .setPos(156, 58)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mWrench, val -> mWrench = val)); + builder.widget( + new ItemDrawable(() -> mToolStacks.get(mCrowbar + "CROWBAR")).asWidget() + .setPos(156, 76)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mCrowbar, val -> mCrowbar = val)); + builder.widget( + new ItemDrawable(() -> mToolStacks.get(mHardHammer + "HARDHAMMER")).asWidget() + .setPos(156, 94)) + .widget( + new TextWidget("H").setDefaultColor(COLOR_TEXT_WHITE.get()) + .setPos(167, 103)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mHardHammer, val -> mHardHammer = val)); + builder.widget( + new ItemDrawable(() -> mToolStacks.get(mSoftHammer + "SOFTHAMMER")).asWidget() + .setPos(156, 112)) + .widget( + new TextWidget("M").setDefaultColor(COLOR_TEXT_WHITE.get()) + .setPos(167, 121)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mSoftHammer, val -> mSoftHammer = val)); + builder.widget( + new ItemDrawable(() -> mToolStacks.get(mScrewdriver + "SCREWDRIVER")).asWidget() + .setPos(156, 130)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mScrewdriver, val -> mScrewdriver = val)); builder.widget( - new ItemDrawable(() -> mToolStacks.get(mSolderingTool + "SOLDERING_IRON_LV")).asWidget() - .setPos(156, 148)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mSolderingTool, val -> mSolderingTool = val)); + new ItemDrawable(() -> mToolStacks.get(mSolderingTool + "SOLDERING_IRON_LV")).asWidget() + .setPos(156, 148)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mSolderingTool, val -> mSolderingTool = val)); builder.widget( - new ItemDrawable(() -> mToolStacks.get(getBaseMetaTileEntity().isActive() + "GLASS")).asWidget() - .setPos(156, 22)) - .widget( - TextWidget.dynamicString(() -> getBaseMetaTileEntity().isActive() ? "On" : "Off") - .setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(157, 31)) - .widget( - new FakeSyncWidget.BooleanSyncer( - () -> getBaseMetaTileEntity().isActive(), - val -> getBaseMetaTileEntity().setActive(val))); + new ItemDrawable(() -> mToolStacks.get(getBaseMetaTileEntity().isActive() + "GLASS")).asWidget() + .setPos(156, 22)) + .widget( + TextWidget.dynamicString(() -> getBaseMetaTileEntity().isActive() ? "On" : "Off") + .setSynced(false) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setPos(157, 31)) + .widget( + new FakeSyncWidget.BooleanSyncer( + () -> getBaseMetaTileEntity().isActive(), + val -> getBaseMetaTileEntity().setActive(val))); } protected void drawTextsNoPlayerInventory(DynamicPositionedColumn screenElements) { - screenElements.setSynced(false).setSpace(0).setPos(6, 7); + screenElements.setSynced(false) + .setSpace(0) + .setPos(6, 7); screenElements - .widget( - new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")) - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> !mMachine)) - .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.machines.input") + " " - + StatCollector.translateToLocal("GTPP.machines.tier") - + ": " - + EnumChatFormatting.GREEN - + GT_Values.VOLTAGE_NAMES[(int) getInputTier()]) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine && getInputTier() > 0)) - .widget( - TextWidget.dynamicString( - () -> StatCollector.translateToLocal("GTPP.machines.output") + " " - + StatCollector.translateToLocal("GTPP.machines.tier") - + ": " - + EnumChatFormatting.GREEN - + GT_Values.VOLTAGE_NAMES[(int) getOutputTier()]) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine && getOutputTier() > 0)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.multiblock.progress") + ": " - + EnumChatFormatting.GREEN - + getBaseMetaTileEntity().getProgress() / 20 - + EnumChatFormatting.RESET - + " s / " - + EnumChatFormatting.YELLOW - + getBaseMetaTileEntity().getMaxProgress() / 20 - + EnumChatFormatting.RESET - + " s") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - new TextWidget(StatCollector.translateToLocal("GTPP.multiblock.energy") + ":") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal( - "" + EnumChatFormatting.GREEN - + getStoredEnergyInAllEnergyHatches() - + EnumChatFormatting.RESET - + " EU / " - + EnumChatFormatting.YELLOW - + getMaxEnergyStorageOfAllEnergyHatches() - + EnumChatFormatting.RESET - + " EU")) - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - new TextWidget(StatCollector.translateToLocal("GTPP.multiblock.usage") + ":") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine && getLastRecipeEU() > 0 && getLastRecipeDuration() > 0)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal( - "" + EnumChatFormatting.RED - + -getLastRecipeEU() - + EnumChatFormatting.RESET - + " EU/t/parallel")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine && getLastRecipeEU() > 0 && getLastRecipeDuration() > 0)) - .widget( - TextWidget - .dynamicString(() -> StatCollector.translateToLocal("GTPP.multiblock.generation") + ":") - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine && getLastRecipeEU() < 0 && getLastRecipeDuration() > 0)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal( - "" + EnumChatFormatting.GREEN - + getLastRecipeEU() - + EnumChatFormatting.RESET - + " EU/t/parallel")) - .setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine && getLastRecipeEU() < 0 && getLastRecipeDuration() > 0)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.multiblock.duration") + ": " - + EnumChatFormatting.RED - + getLastRecipeDuration() - + EnumChatFormatting.RESET - + " ticks") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled( - widget -> mMachine && getLastRecipeEU() != 0 && getLastRecipeDuration() > 0)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.multiblock.specialvalue") + ": " - + EnumChatFormatting.RED - + getLastRecipeEU() - + EnumChatFormatting.RESET - + "") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled( - widget -> mMachine && getLastRecipeEU() != 0 - && getLastRecipeDuration() > 0 - && (mLastRecipe != null ? mLastRecipe.mSpecialValue : 0) > 0)) - .widget( - new TextWidget(StatCollector.translateToLocal("GTPP.multiblock.mei") + ":") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal( - "" + EnumChatFormatting.YELLOW - + getMaxInputVoltage() - + EnumChatFormatting.RESET - + " EU/t(*2A) " - + StatCollector.translateToLocal("GTPP.machines.tier") - + ": " - + EnumChatFormatting.YELLOW - + GT_Values.VN[GT_Utility.getTier(getMaxInputVoltage())] - + EnumChatFormatting.RESET)) - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.multiblock.efficiency") + ": " - + EnumChatFormatting.YELLOW - + (mEfficiency / 100.0F) - + EnumChatFormatting.RESET - + " %") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.multiblock.pollution") + ": " - + EnumChatFormatting.RED - + (getPollutionPerTick(null) * 20) - + EnumChatFormatting.RESET - + "/sec") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced") + ": " - + EnumChatFormatting.GREEN - + getPollutionReductionForAllMufflers() - + EnumChatFormatting.RESET - + " %") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - new TextWidget("Total Time Since Built: ").setDefaultColor(COLOR_TEXT_WHITE.get()) - .setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> "" + EnumChatFormatting.DARK_GREEN - + getRuntimeWeeksDisplay() - + EnumChatFormatting.RESET - + " Weeks,") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> "" + EnumChatFormatting.DARK_GREEN - + getRuntimeDaysDisplay() - + EnumChatFormatting.RESET - + " Days,") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> "" + EnumChatFormatting.DARK_GREEN - + getRuntimeHoursDisplay() - + EnumChatFormatting.RESET - + " Hours,") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> "" + EnumChatFormatting.DARK_GREEN - + getRuntimeMinutesDisplay() - + EnumChatFormatting.RESET - + " Minutes,") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)) - .widget( - TextWidget - .dynamicString( - () -> "" + EnumChatFormatting.DARK_GREEN - + getRuntimeSecondsDisplay() - + EnumChatFormatting.RESET - + " Seconds") - .setDefaultColor(COLOR_TEXT_WHITE.get()).setEnabled(widget -> mMachine)); + .widget( + new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")).setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> !mMachine)) + .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.machines.input") + " " + + StatCollector.translateToLocal("GTPP.machines.tier") + + ": " + + EnumChatFormatting.GREEN + + GT_Values.VOLTAGE_NAMES[(int) getInputTier()]) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getInputTier() > 0)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.machines.output") + " " + + StatCollector.translateToLocal("GTPP.machines.tier") + + ": " + + EnumChatFormatting.GREEN + + GT_Values.VOLTAGE_NAMES[(int) getOutputTier()]) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getOutputTier() > 0)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.multiblock.progress") + ": " + + EnumChatFormatting.GREEN + + getBaseMetaTileEntity().getProgress() / 20 + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + getBaseMetaTileEntity().getMaxProgress() / 20 + + EnumChatFormatting.RESET + + " s") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + new TextWidget(StatCollector.translateToLocal("GTPP.multiblock.energy") + ":") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal( + "" + EnumChatFormatting.GREEN + + getStoredEnergyInAllEnergyHatches() + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + getMaxEnergyStorageOfAllEnergyHatches() + + EnumChatFormatting.RESET + + " EU")) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + new TextWidget(StatCollector.translateToLocal("GTPP.multiblock.usage") + ":") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getLastRecipeEU() > 0 && getLastRecipeDuration() > 0)) + .widget( + TextWidget.dynamicString( + () -> StatCollector.translateToLocal( + "" + EnumChatFormatting.RED + -getLastRecipeEU() + EnumChatFormatting.RESET + " EU/t/parallel")) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getLastRecipeEU() > 0 && getLastRecipeDuration() > 0)) + .widget( + TextWidget.dynamicString(() -> StatCollector.translateToLocal("GTPP.multiblock.generation") + ":") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getLastRecipeEU() < 0 && getLastRecipeDuration() > 0)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal( + "" + EnumChatFormatting.GREEN + + getLastRecipeEU() + + EnumChatFormatting.RESET + + " EU/t/parallel")) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getLastRecipeEU() < 0 && getLastRecipeDuration() > 0)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.multiblock.duration") + ": " + + EnumChatFormatting.RED + + getLastRecipeDuration() + + EnumChatFormatting.RESET + + " ticks") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine && getLastRecipeEU() != 0 && getLastRecipeDuration() > 0)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.multiblock.specialvalue") + ": " + + EnumChatFormatting.RED + + getLastRecipeEU() + + EnumChatFormatting.RESET + + "") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled( + widget -> mMachine && getLastRecipeEU() != 0 + && getLastRecipeDuration() > 0 + && (mLastRecipe != null ? mLastRecipe.mSpecialValue : 0) > 0)) + .widget( + new TextWidget(StatCollector.translateToLocal("GTPP.multiblock.mei") + ":") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal( + "" + EnumChatFormatting.YELLOW + + getMaxInputVoltage() + + EnumChatFormatting.RESET + + " EU/t(*2A) " + + StatCollector.translateToLocal("GTPP.machines.tier") + + ": " + + EnumChatFormatting.YELLOW + + GT_Values.VN[GT_Utility.getTier(getMaxInputVoltage())] + + EnumChatFormatting.RESET)) + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.multiblock.efficiency") + ": " + + EnumChatFormatting.YELLOW + + (mEfficiency / 100.0F) + + EnumChatFormatting.RESET + + " %") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.multiblock.pollution") + ": " + + EnumChatFormatting.RED + + (getPollutionPerTick(null) * 20) + + EnumChatFormatting.RESET + + "/sec") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> StatCollector.translateToLocal("GTPP.multiblock.pollutionreduced") + ": " + + EnumChatFormatting.GREEN + + getPollutionReductionForAllMufflers() + + EnumChatFormatting.RESET + + " %") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + new TextWidget("Total Time Since Built: ").setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> "" + EnumChatFormatting.DARK_GREEN + + getRuntimeWeeksDisplay() + + EnumChatFormatting.RESET + + " Weeks,") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> "" + EnumChatFormatting.DARK_GREEN + + getRuntimeDaysDisplay() + + EnumChatFormatting.RESET + + " Days,") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> "" + EnumChatFormatting.DARK_GREEN + + getRuntimeHoursDisplay() + + EnumChatFormatting.RESET + + " Hours,") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> "" + EnumChatFormatting.DARK_GREEN + + getRuntimeMinutesDisplay() + + EnumChatFormatting.RESET + + " Minutes,") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)) + .widget( + TextWidget + .dynamicString( + () -> "" + EnumChatFormatting.DARK_GREEN + + getRuntimeSecondsDisplay() + + EnumChatFormatting.RESET + + " Seconds") + .setDefaultColor(COLOR_TEXT_WHITE.get()) + .setEnabled(widget -> mMachine)); } protected int getLastRecipeEU() { @@ -1617,7 +1666,7 @@ public abstract class GregtechMeta_MultiBlockBase t) { @@ -1713,7 +1754,7 @@ public abstract class GregtechMeta_MultiBlockBase t) { @@ -1731,14 +1772,17 @@ public abstract class GregtechMeta_MultiBlockBase> aAdder, - Class... aMteClasses) { + Class... aMteClasses) { this.mMteClasses = Arrays.asList(aMteClasses); this.mAdder = aAdder; } GTPPHatchElement(IGT_HatchAdder> aAdder, String... aClassNames) { - this.mMteClasses = Arrays.stream(aClassNames).map(ReflectionUtils::getClass).filter(Objects::nonNull) - .>map(GTPPHatchElement::retype).collect(Collectors.toList()); + this.mMteClasses = Arrays.stream(aClassNames) + .map(ReflectionUtils::getClass) + .filter(Objects::nonNull) + .>map(GTPPHatchElement::retype) + .collect(Collectors.toList()); this.mAdder = aAdder; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java index 53950bfa7b..6e501815f0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java @@ -42,7 +42,7 @@ import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; public abstract class GregtechMeta_SteamMultiBase> - extends GregtechMeta_MultiBlockBase { + extends GregtechMeta_MultiBlockBase { public ArrayList mSteamInputs = new ArrayList<>(); public ArrayList mSteamOutputs = new ArrayList<>(); @@ -62,10 +62,10 @@ public abstract class GregtechMeta_SteamMultiBase= aStack.stackSize) { - tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); + if (GT_Utility.areStacksEqual( + aStack, + tHatch.getBaseMetaTileEntity() + .getStackInSlot(0))) { + if (tHatch.getBaseMetaTileEntity() + .getStackInSlot(0).stackSize >= aStack.stackSize) { + tHatch.getBaseMetaTileEntity() + .decrStackSize(0, aStack.stackSize); return true; } } } for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : filterValidMTEs(mSteamInputs)) { tHatch.mRecipeMap = getRecipeMap(); - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) { - tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize); + for (int i = tHatch.getBaseMetaTileEntity() + .getSizeInventory() - 1; i >= 0; i--) { + if (GT_Utility.areStacksEqual( + aStack, + tHatch.getBaseMetaTileEntity() + .getStackInSlot(i))) { + if (tHatch.getBaseMetaTileEntity() + .getStackInSlot(0).stackSize >= aStack.stackSize) { + tHatch.getBaseMetaTileEntity() + .decrStackSize(0, aStack.stackSize); return true; } } @@ -248,9 +259,13 @@ public abstract class GregtechMeta_SteamMultiBase rList = new ArrayList<>(); for (GT_MetaTileEntity_Hatch_Steam_BusInput tHatch : filterValidMTEs(mSteamInputs)) { tHatch.mRecipeMap = getRecipeMap(); - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + for (int i = tHatch.getBaseMetaTileEntity() + .getSizeInventory() - 1; i >= 0; i--) { + if (tHatch.getBaseMetaTileEntity() + .getStackInSlot(i) != null) { + rList.add( + tHatch.getBaseMetaTileEntity() + .getStackInSlot(i)); } } } @@ -268,13 +283,15 @@ public abstract class GregtechMeta_SteamMultiBase= 0 && !outputSuccess; i--) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, single)) outputSuccess = true; + if (tHatch.getBaseMetaTileEntity() + .addStackToSlot(i, single)) outputSuccess = true; } } } for (GT_MetaTileEntity_Hatch_Output tHatch : filterValidMTEs(mOutputHatches)) { if (!outputSuccess && tHatch.outputsItems()) { - if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, single)) outputSuccess = true; + if (tHatch.getBaseMetaTileEntity() + .addStackToSlot(1, single)) outputSuccess = true; } } } @@ -285,8 +302,11 @@ public abstract class GregtechMeta_SteamMultiBase getStoredOutputs() { ArrayList rList = new ArrayList<>(); for (GT_MetaTileEntity_Hatch_Steam_BusOutput tHatch : filterValidMTEs(mSteamOutputs)) { - for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i)); + for (int i = tHatch.getBaseMetaTileEntity() + .getSizeInventory() - 1; i >= 0; i--) { + rList.add( + tHatch.getBaseMetaTileEntity() + .getStackInSlot(i)); } } return rList; @@ -336,29 +356,28 @@ public abstract class GregtechMeta_SteamMultiBase currentTip, IWailaDataAccessor accessor, - IWailaConfigHandler config) { + IWailaConfigHandler config) { final NBTTagCompound tag = accessor.getNBTData(); if (tag.getBoolean("incompleteStructure")) { currentTip.add(RED + "** INCOMPLETE STRUCTURE **" + RESET); } currentTip.add( - (tag.getBoolean("hasProblems") ? (RED + "** HAS PROBLEMS **") : GREEN + "Running Fine") + RESET - + " Efficiency: " - + tag.getFloat("efficiency") - + "%"); + (tag.getBoolean("hasProblems") ? (RED + "** HAS PROBLEMS **") : GREEN + "Running Fine") + RESET + + " Efficiency: " + + tag.getFloat("efficiency") + + "%"); boolean isActive = tag.getBoolean("isActive"); if (isActive) { long actualEnergyUsage = tag.getLong("energyUsage"); if (actualEnergyUsage > 0) { currentTip.add( - StatCollector - .translateToLocalFormatted("GTPP.waila.steam.use", formatNumbers(actualEnergyUsage))); + StatCollector.translateToLocalFormatted("GTPP.waila.steam.use", formatNumbers(actualEnergyUsage))); } } currentTip.add( - GT_Waila.getMachineProgressString(isActive, tag.getInteger("maxProgress"), tag.getInteger("progress"))); + GT_Waila.getMachineProgressString(isActive, tag.getInteger("maxProgress"), tag.getInteger("progress"))); // Show ns on the tooltip if (GT_Mod.gregtechproxy.wailaAverageNS && tag.hasKey("averageNS")) { int tAverageTime = tag.getInteger("averageNS"); @@ -368,9 +387,10 @@ public abstract class GregtechMeta_SteamMultiBase> GT_HatchElementBuilder buildSteamInput( - Class typeToken) { - return buildHatchAdder(typeToken).adder(GregtechMeta_SteamMultiBase::addToMachineList).hatchIds(31040) - .shouldReject(t -> !t.mSteamInputFluids.isEmpty()); + Class typeToken) { + return buildHatchAdder(typeToken).adder(GregtechMeta_SteamMultiBase::addToMachineList) + .hatchIds(31040) + .shouldReject(t -> !t.mSteamInputFluids.isEmpty()); } protected enum SteamHatchElement implements IHatchElement> { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java index dd063840c6..3f0d8d1ec1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaBoilerBase.java @@ -33,20 +33,20 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank public long RI = MathUtils.randLong(5L, 30L); public GregtechMetaBoilerBase(final int aID, final String aName, final String aNameRegional, - final String aDescription, final ITexture... aTextures) { + final String aDescription, final ITexture... aTextures) { super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); } public GregtechMetaBoilerBase(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, - final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { + final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { ITexture[] tmp = this.mTextures[side.offsetY == 0 ? side != facing ? 2 : ((byte) (aActive ? 4 : 3)) - : side.ordinal()][aColorIndex + 1]; + : side.ordinal()][aColorIndex + 1]; if ((side != facing) && (tmp.length == 2)) { tmp = new ITexture[] { tmp[0] }; } @@ -106,7 +106,8 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank if (aPlayer != null) { if (GT_Utility.areStacksEqual(aPlayer.getCurrentEquippedItem(), new ItemStack(Items.water_bucket, 1))) { this.fill(Materials.Water.getFluid(1000 * aPlayer.getCurrentEquippedItem().stackSize), true); - aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket); + aPlayer.getCurrentEquippedItem() + .func_150996_a(Items.bucket); } else { GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); } @@ -167,7 +168,8 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank @Override public boolean allowCoverOnSide(final ForgeDirection side, final GT_ItemStack aCover) { - return GregTech_API.getCoverBehaviorNew(aCover.toStack()).isSimpleCover(); + return GregTech_API.getCoverBehaviorNew(aCover.toStack()) + .isSimpleCover(); } @Override @@ -208,14 +210,14 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(side); if (tTileEntity != null) { final FluidStack tDrained = aBaseMetaTileEntity - .drain(side, Math.max(1, this.mSteam.amount / 2), false); + .drain(side, Math.max(1, this.mSteam.amount / 2), false); if (tDrained != null) { final int tFilledAmount = tTileEntity.fill(side.getOpposite(), tDrained, false); if (tFilledAmount > 0) { tTileEntity.fill( - side.getOpposite(), - aBaseMetaTileEntity.drain(side, tFilledAmount, true), - true); + side.getOpposite(), + aBaseMetaTileEntity.drain(side, tFilledAmount, true), + true); } } } @@ -248,59 +250,52 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank this.mSteam.amount = getSteamCapacity() * 3 / 4; } if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) - && (this.mInventory[2] != null)) { + && (this.mInventory[2] != null)) { if ((GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) - || (GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) - || (GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) - || (GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal)))) { + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) + || (GT_OreDictUnificator + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) + || (GT_OreDictUnificator + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) + || (GT_OreDictUnificator + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal)))) { this.mProcessingEnergy += 160; aBaseMetaTileEntity.decrStackSize(2, 1); if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { - aBaseMetaTileEntity.addStackToSlot( - 3, - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + aBaseMetaTileEntity + .addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); } } else if (GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) { - this.mProcessingEnergy += 160; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { - aBaseMetaTileEntity.addStackToSlot( - 3, - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); - } - } else - if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke")) { + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) { + this.mProcessingEnergy += 160; + aBaseMetaTileEntity.decrStackSize(2, 1); + if (aBaseMetaTileEntity.getRandomNumber(3) == 0) { + aBaseMetaTileEntity + .addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); + } + } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke")) { this.mProcessingEnergy += 640; aBaseMetaTileEntity.decrStackSize(2, 1); if (aBaseMetaTileEntity.getRandomNumber(2) == 0) { - aBaseMetaTileEntity.addStackToSlot( - 3, - GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); + aBaseMetaTileEntity + .addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L)); } } else if ((GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) - || (GT_OreDictUnificator - .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) - || (GT_OreDictUnificator.isItemStackInstanceOf( - this.mInventory[2], - OrePrefixes.dustImpure.get(Materials.Lignite))) - || (GT_OreDictUnificator.isItemStackInstanceOf( - this.mInventory[2], - OrePrefixes.crushed.get(Materials.Lignite)))) { - this.mProcessingEnergy += 40; - aBaseMetaTileEntity.decrStackSize(2, 1); - if (aBaseMetaTileEntity.getRandomNumber(8) == 0) { - aBaseMetaTileEntity.addStackToSlot( - 3, - GT_OreDictUnificator - .get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); - } - } + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) + || (GT_OreDictUnificator + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) + || (GT_OreDictUnificator + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) + || (GT_OreDictUnificator + .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) { + this.mProcessingEnergy += 40; + aBaseMetaTileEntity.decrStackSize(2, 1); + if (aBaseMetaTileEntity.getRandomNumber(8) == 0) { + aBaseMetaTileEntity.addStackToSlot( + 3, + GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + } + } } if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) { this.mProcessingEnergy -= 2; @@ -315,18 +310,18 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank // support returning those different capacities. public FluidTankInfo[] getTankInfo(ForgeDirection aSide) { return new FluidTankInfo[] { new FluidTankInfo(this.mFluid, getCapacity()), - new FluidTankInfo(this.mSteam, getSteamCapacity()) }; + new FluidTankInfo(this.mSteam, getSteamCapacity()) }; } @Override public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return (aIndex == 1) || (aIndex == 3); } @Override public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return aIndex == 2; } @@ -335,7 +330,9 @@ public abstract class GregtechMetaBoilerBase extends GT_MetaTileEntity_BasicTank if (aIndex == 1) { GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 2, 1.0F, aX, aY, aZ); for (int l = 0; l < 8; l++) { - this.getBaseMetaTileEntity().getWorld().spawnParticle( + this.getBaseMetaTileEntity() + .getWorld() + .spawnParticle( "largesmoke", (aX - 0.5D) + Math.random(), aY, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java index a64903e445..5e0588acfd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechMetaSolarGenerator.java @@ -22,12 +22,12 @@ public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_Basic public static int sEnergyPerTick = 16; public GregtechMetaSolarGenerator(final int aID, final String aName, final String aNameRegional, final int aTier, - final String aDescription, final ITexture... aTextures) { + final String aDescription, final ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); } public GregtechMetaSolarGenerator(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); } @@ -51,12 +51,10 @@ public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_Basic @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, - final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) - + (side == facing ? 0 - : side == facing.getOpposite() ? 1 - : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex - + 1]; + final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (side == facing ? 0 + : side == facing.getOpposite() ? 1 + : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex + 1]; } @Override @@ -145,7 +143,8 @@ public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_Basic @Override public long maxEUOutput() { - return this.getBaseMetaTileEntity().isAllowedToWork() ? V[this.mTier] : 0; + return this.getBaseMetaTileEntity() + .isAllowedToWork() ? V[this.mTier] : 0; } @Override @@ -156,9 +155,9 @@ public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_Basic @Override public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() - && (aTick > 20L) - && (aBaseMetaTileEntity.getUniversalEnergyStored() - < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) { + && (aTick > 20L) + && (aBaseMetaTileEntity.getUniversalEnergyStored() + < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) { if (this.mSolarCharge <= 20) { this.mSolarCharge = 20; @@ -172,12 +171,13 @@ public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_Basic if ((aTick % 25L) == 0L) { if (this.mSolarCharge > 100) { if ((this.mProcessingEnergy > 0) && (aBaseMetaTileEntity.isAllowedToWork()) - && ((aTick % 256L) == 0L) - && (!aBaseMetaTileEntity.getWorld().isThundering() - && (aBaseMetaTileEntity.getUniversalEnergyStored() - < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())))) { + && ((aTick % 256L) == 0L) + && (!aBaseMetaTileEntity.getWorld() + .isThundering() + && (aBaseMetaTileEntity.getUniversalEnergyStored() + < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())))) { this.getBaseMetaTileEntity() - .increaseStoredEnergyUnits((sEnergyPerTick * this.getEfficiency()) / 10, false); + .increaseStoredEnergyUnits((sEnergyPerTick * this.getEfficiency()) / 10, false); } } } @@ -188,19 +188,21 @@ public abstract class GregtechMetaSolarGenerator extends GT_MetaTileEntity_Basic } if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) - && ((aTick % 256L) == 0L) - && (!aBaseMetaTileEntity.getWorld().isThundering())) { - final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() - && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); + && ((aTick % 256L) == 0L) + && (!aBaseMetaTileEntity.getWorld() + .isThundering())) { + final boolean bRain = aBaseMetaTileEntity.getWorld() + .isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) - || !aBaseMetaTileEntity.getSkyAtSide(ForgeDirection.UP) ? 0 - : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; + || !aBaseMetaTileEntity.getSkyAtSide(ForgeDirection.UP) ? 0 + : !bRain && aBaseMetaTileEntity.getWorld() + .isDaytime() ? 8 : 1; } if (aBaseMetaTileEntity.isServerSide()) { aBaseMetaTileEntity.setActive( - aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() - >= (this.maxEUOutput() + this.getMinimumStoredEU()))); + aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() + >= (this.maxEUOutput() + this.getMinimumStoredEU()))); } } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java index 2b2766399d..83745f393a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java @@ -30,21 +30,21 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ protected int pollMin, pollMax; public GregtechRocketFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, - final int aTier, final String aDescription, final ITexture... aTextures) { + final int aTier, final String aDescription, final ITexture... aTextures) { super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures); pollMin = (int) (CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator - * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); pollMax = (int) (CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator - * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); } public GregtechRocketFuelGeneratorBase(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, 3, aDescription, aTextures); pollMin = (int) (CORE.ConfigSwitches.baseMinPollutionPerSecondRocketFuelGenerator - * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); pollMax = (int) (CORE.ConfigSwitches.baseMaxPollutionPerSecondRocketFuelGenerator - * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); + * CORE.ConfigSwitches.pollutionReleasedByTierRocketFuelGenerator[mTier]); } @Override @@ -67,22 +67,20 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, - final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) - + (side == facing ? 0 - : side == facing.getOpposite() ? 1 - : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex - + 1]; + final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (side == facing ? 0 + : side == facing.getOpposite() ? 1 + : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex + 1]; } @Override public String[] getDescription() { String aPollution = "Causes between " + pollMin + " and " + pollMax + " Pollution per second"; return ArrayUtils.addAll( - this.mDescriptionArray, - "Fuel Efficiency: " + this.getEfficiency() + "%", - aPollution, - CORE.GT_Tooltip.get()); + this.mDescriptionArray, + "Fuel Efficiency: " + this.getEfficiency() + "%", + aPollution, + CORE.GT_Tooltip.get()); } @Override @@ -153,7 +151,8 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ @Override public boolean isOutputFacing(final ForgeDirection side) { - return this.getBaseMetaTileEntity().getFrontFacing() == side; + return this.getBaseMetaTileEntity() + .getFrontFacing() == side; } @Override @@ -218,20 +217,19 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ this.mInventory[this.getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1); } this.mInventory[this.getStackDisplaySlot()].setStackDisplayName( - "Generating: " - + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) - + " EU"); + "Generating: " + (aBaseMetaTileEntity.getUniversalEnergyStored() - this.getMinimumStoredEU()) + + " EU"); } } else { final int tFuelValue = this.getFuelValue(this.mFluid), - tConsumed = this.consumedFluidPerOperation(this.mFluid); + tConsumed = this.consumedFluidPerOperation(this.mFluid); if ((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount >= tConsumed)) { final long tFluidAmountToUse = Math.min( - this.mFluid.amount / tConsumed, - (((this.maxEUOutput() * 20) + this.getMinimumStoredEU()) - - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); + this.mFluid.amount / tConsumed, + (((this.maxEUOutput() * 20) + this.getMinimumStoredEU()) + - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); if ((tFluidAmountToUse > 0) - && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { + && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { int aSafeFloor = (int) Math.max(((tFluidAmountToUse * tConsumed) / 3), 1); this.mFluid.amount -= (int) aSafeFloor; PollutionUtils.addPollution(getBaseMetaTileEntity(), 10 * getPollution()); @@ -239,9 +237,9 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ } } if ((this.mInventory[this.getInputSlot()] != null) - && (aBaseMetaTileEntity.getUniversalEnergyStored() - < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())) - && (GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null)) { + && (aBaseMetaTileEntity.getUniversalEnergyStored() + < ((this.maxEUOutput() * 20) + this.getMinimumStoredEU())) + && (GT_Utility.getFluidForFilledItem(this.mInventory[this.getInputSlot()], true) == null)) { final int tFuelValue = this.getFuelValue(this.mInventory[this.getInputSlot()]); if (tFuelValue > 0) { final ItemStack tEmptyContainer = this.getEmptyContainer(this.mInventory[this.getInputSlot()]); @@ -256,8 +254,8 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ if (aBaseMetaTileEntity.isServerSide()) { aBaseMetaTileEntity.setActive( - aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() - >= (this.maxEUOutput() + this.getMinimumStoredEU()))); + aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() + >= (this.maxEUOutput() + this.getMinimumStoredEU()))); } } @@ -279,7 +277,8 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ return 0; } FluidStack tLiquid; - final Collection tRecipeList = this.getRecipeMap().getAllRecipes(); + final Collection tRecipeList = this.getRecipeMap() + .getAllRecipes(); for (final GT_Recipe tFuel : tRecipeList) { if ((tLiquid = tFuel.mFluidInputs[0]) != null) { if (aLiquid.isFluidEqual(tLiquid)) { @@ -296,7 +295,7 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ return 0; } final GT_Recipe tFuel = this.getRecipeMap() - .findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + .findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); if (tFuel != null) { return (int) ((tFuel.mSpecialValue * 1000L * this.getEfficiency()) / 100); } @@ -308,7 +307,7 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ return null; } final GT_Recipe tFuel = this.getRecipeMap() - .findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); + .findRecipe(this.getBaseMetaTileEntity(), false, Long.MAX_VALUE, null, aStack); if (tFuel != null) { return GT_Utility.copy(tFuel.getOutput(0)); } @@ -317,9 +316,9 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_ @Override public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return super.allowPutStack(aBaseMetaTileEntity, aIndex, side, aStack) && ((this.getFuelValue(aStack) > 0) - || (this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0)); + || (this.getFuelValue(GT_Utility.getFluidForFilledItem(aStack, true)) > 0)); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java index 25e831d4ef..fe3253244a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaTreeFarmerBase.java @@ -13,12 +13,12 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public abstract class GregtechMetaTreeFarmerBase extends GT_MetaTileEntity_TieredMachineBlock { public GregtechMetaTreeFarmerBase(final int aID, final String aName, final String aNameRegional, final int aTier, - final int aInvSlotCount, final String aDescription) { + final int aInvSlotCount, final String aDescription) { super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription); } public GregtechMetaTreeFarmerBase(final String aName, final int aTier, final int aInvSlotCount, - final String[] aDescription, final ITexture[][][] aTextures) { + final String[] aDescription, final ITexture[][][] aTextures) { super(aName, aTier, aInvSlotCount, aDescription, aTextures); } @@ -42,12 +42,10 @@ public abstract class GregtechMetaTreeFarmerBase extends GT_MetaTileEntity_Tiere @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, - final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { - return this.mTextures[(aActive ? 5 : 0) - + (side == facing ? 0 - : side == facing.getOpposite() ? 1 - : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex - + 1]; + final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (side == facing ? 0 + : side == facing.getOpposite() ? 1 + : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex + 1]; } @Override @@ -82,7 +80,8 @@ public abstract class GregtechMetaTreeFarmerBase extends GT_MetaTileEntity_Tiere @Override public boolean isOutputFacing(final ForgeDirection side) { - return this.getBaseMetaTileEntity().getBackFacing() == side; + return this.getBaseMetaTileEntity() + .getBackFacing() == side; } @Override @@ -129,13 +128,13 @@ public abstract class GregtechMetaTreeFarmerBase extends GT_MetaTileEntity_Tiere @Override public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return false; } @Override public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return false; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java index 2ca8b0ba74..e81c9ed554 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java @@ -22,14 +22,14 @@ import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.util.minecraft.ItemUtils; public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileEntity_Hatch - implements IAddGregtechLogo { + implements IAddGregtechLogo { private final int mInputslotCount; private final int mTotalSlotCount; private final boolean mAllowDuplicateUsageTypes; public GT_MetaTileEntity_Hatch_NbtConsumable(int aID, String aName, String aNameRegional, int aTier, - int aInputSlots, String aDescription, boolean aAllowDuplicateTypes) { + int aInputSlots, String aDescription, boolean aAllowDuplicateTypes) { super(aID, aName, aNameRegional, aTier, aInputSlots * 2, aDescription); mInputslotCount = getInputSlotCount(); mTotalSlotCount = getInputSlotCount() * 2; @@ -37,7 +37,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE } public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String[] aDescription, - boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { + boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { super(aName, aTier, aInputSlots * 2, aDescription, aTextures); mInputslotCount = getInputSlotCount(); mTotalSlotCount = getInputSlotCount() * 2; @@ -118,16 +118,16 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE for (int i = 0; i <= getSlotID_LastInput(); i++) { for (int j = i + 1; j <= getSlotID_LastInput(); j++) { if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } } } @@ -232,15 +232,15 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE @Override public final boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @Override public final boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() && isItemValidForUsageSlot(aStack) - && aIndex < mInputslotCount; + && aIndex < mInputslotCount; } /** @@ -278,11 +278,13 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE public void addGregTechLogo(ModularWindow.Builder builder) { switch (mTotalSlotCount) { case 8, 18 -> builder.widget( - new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17) - .setPos(152, 63)); + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()) + .setSize(17, 17) + .setPos(152, 63)); case 32 -> builder.widget( - new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17) - .setPos(79, 35)); + new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()) + .setSize(17, 17) + .setPos(79, 35)); } } @@ -291,31 +293,60 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE switch (mTotalSlotCount) { case 8 -> { builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(0).endAtSlot(3).build() - .setPos(25, 25)); + SlotGroup.ofItemHandler(inventoryHandler, 2) + .startFromSlot(0) + .endAtSlot(3) + .build() + .setPos(25, 25)); builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 2).startFromSlot(4).endAtSlot(7).canInsert(false) - .build().setPos(115, 25)); - builder.widget(new TextWidget("Stock").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(25, 16)) - .widget(new TextWidget("Active").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(115, 16)); + SlotGroup.ofItemHandler(inventoryHandler, 2) + .startFromSlot(4) + .endAtSlot(7) + .canInsert(false) + .build() + .setPos(115, 25)); + builder.widget( + new TextWidget("Stock").setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(25, 16)) + .widget( + new TextWidget("Active").setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(115, 16)); } case 18 -> { builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(0).endAtSlot(8).build() - .setPos(25, 19)); + SlotGroup.ofItemHandler(inventoryHandler, 3) + .startFromSlot(0) + .endAtSlot(8) + .build() + .setPos(25, 19)); + builder.widget( + SlotGroup.ofItemHandler(inventoryHandler, 3) + .startFromSlot(9) + .endAtSlot(17) + .canInsert(false) + .build() + .setPos(97, 19)); builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 3).startFromSlot(9).endAtSlot(17).canInsert(false) - .build().setPos(97, 19)); - builder.widget(new TextWidget("Stock").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(25, 14)) - .widget(new TextWidget("Active").setDefaultColor(COLOR_TEXT_GRAY.get()).setPos(15, 14)); + new TextWidget("Stock").setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(25, 14)) + .widget( + new TextWidget("Active").setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(15, 14)); } case 32 -> { builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15).build() - .setPos(7, 7)); + SlotGroup.ofItemHandler(inventoryHandler, 4) + .startFromSlot(0) + .endAtSlot(15) + .build() + .setPos(7, 7)); builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(16).endAtSlot(31).canInsert(false) - .build().setPos(96, 7)); + SlotGroup.ofItemHandler(inventoryHandler, 4) + .startFromSlot(16) + .endAtSlot(31) + .canInsert(false) + .build() + .setPos(96, 7)); } } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java index 77ad6cd4ac..967d3ae916 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechItemData.java @@ -22,13 +22,13 @@ public class GregtechItemData { public ItemStack mUnificationTarget = null; public GregtechItemData(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial, - final boolean aBlackListed) { + final boolean aBlackListed) { this.mPrefix = aPrefix; this.mMaterial = aMaterial == null ? null : new GregtechMaterialStack(aMaterial, aPrefix.mMaterialAmount); this.mBlackListed = aBlackListed; this.mByProducts = (aPrefix.mSecondaryMaterial == null) || (aPrefix.mSecondaryMaterial.mMaterial == null) - ? EMPTY_GT_MaterialStack_ARRAY - : new GregtechMaterialStack[] { aPrefix.mSecondaryMaterial.clone() }; + ? EMPTY_GT_MaterialStack_ARRAY + : new GregtechMaterialStack[] { aPrefix.mSecondaryMaterial.clone() }; } public GregtechItemData(final GregtechOrePrefixes aPrefix, final GT_Materials aMaterial) { @@ -43,7 +43,7 @@ public class GregtechItemData { this.mByProducts = EMPTY_GT_MaterialStack_ARRAY; } else { final GregtechMaterialStack[] tByProducts = aByProducts.length < 1 ? EMPTY_GT_MaterialStack_ARRAY - : new GregtechMaterialStack[aByProducts.length]; + : new GregtechMaterialStack[aByProducts.length]; int j = 0; for (GregtechMaterialStack aByProduct : aByProducts) { if ((aByProduct != null) && (aByProduct.mMaterial != null)) { @@ -58,12 +58,12 @@ public class GregtechItemData { } public GregtechItemData(final GT_Materials aMaterial, final long aAmount, - final GregtechMaterialStack... aByProducts) { + final GregtechMaterialStack... aByProducts) { this(new GregtechMaterialStack(aMaterial, aAmount), aByProducts); } public GregtechItemData(final GT_Materials aMaterial, final long aAmount, final GT_Materials aByProduct, - final long aByProductAmount) { + final long aByProductAmount) { this(new GregtechMaterialStack(aMaterial, aAmount), new GregtechMaterialStack(aByProduct, aByProductAmount)); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java index 5ffdc4d20e..d1ee02f480 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GregtechMaterialStack.java @@ -34,8 +34,8 @@ public class GregtechMaterialStack implements Cloneable { } if (aObject instanceof GregtechMaterialStack) { return (((GregtechMaterialStack) aObject).mMaterial == this.mMaterial) - && ((this.mAmount < 0) || (((GregtechMaterialStack) aObject).mAmount < 0) - || (((GregtechMaterialStack) aObject).mAmount == this.mAmount)); + && ((this.mAmount < 0) || (((GregtechMaterialStack) aObject).mAmount < 0) + || (((GregtechMaterialStack) aObject).mAmount == this.mAmount)); } return false; } @@ -43,9 +43,9 @@ public class GregtechMaterialStack implements Cloneable { @Override public String toString() { return ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? "(" : "") - + this.mMaterial.getToolTip(true) - + ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? ")" : "") - + (this.mAmount > 1 ? this.mAmount : ""); + + this.mMaterial.getToolTip(true) + + ((this.mMaterial.mMaterialList.size() > 1) && (this.mAmount > 1) ? ")" : "") + + (this.mAmount > 1 ? this.mAmount : ""); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java index cffeb41776..65beea207a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java @@ -25,8 +25,11 @@ public class GTPP_Config implements Runnable { public static int addIDConfig(Object aCategory, String aName, int aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; - Property tProperty = sConfigFileIDs - .get(aCategory.toString().replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault); + Property tProperty = sConfigFileIDs.get( + aCategory.toString() + .replaceAll("\\|", "."), + aName.replaceAll("\\|", "."), + aDefault); int rResult = tProperty.getInt(aDefault); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sConfigFileIDs.save(); return rResult; @@ -41,7 +44,8 @@ public class GTPP_Config implements Runnable { } catch (Throwable e) { /* Do nothing */ } - String sName = aStack.getItem().toString(); + String sName = aStack.getItem() + .toString(); String[] tmp = sName.split("@"); if (tmp.length > 0) sName = tmp[0]; return sName + "." + aStack.getItemDamage(); @@ -55,9 +59,10 @@ public class GTPP_Config implements Runnable { public boolean get(Object aCategory, String aName, boolean aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( - aCategory.toString().replaceAll("\\|", "_"), - (aName + "_" + aDefault).replaceAll("\\|", "_"), - aDefault); + aCategory.toString() + .replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); boolean rResult = tProperty.getBoolean(aDefault); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); return rResult; @@ -70,9 +75,10 @@ public class GTPP_Config implements Runnable { public int get(Object aCategory, String aName, int aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( - aCategory.toString().replaceAll("\\|", "_"), - (aName + "_" + aDefault).replaceAll("\\|", "_"), - aDefault); + aCategory.toString() + .replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); int rResult = tProperty.getInt(aDefault); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); return rResult; @@ -85,9 +91,10 @@ public class GTPP_Config implements Runnable { public double get(Object aCategory, String aName, double aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( - aCategory.toString().replaceAll("\\|", "_"), - (aName + "_" + aDefault).replaceAll("\\|", "_"), - aDefault); + aCategory.toString() + .replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); double rResult = tProperty.getDouble(aDefault); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); return rResult; @@ -100,9 +107,10 @@ public class GTPP_Config implements Runnable { public String get(Object aCategory, String aName, String aDefault) { if (GT_Utility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( - aCategory.toString().replaceAll("\\|", "_"), - (aName + "_" + aDefault).replaceAll("\\|", "_"), - aDefault); + aCategory.toString() + .replaceAll("\\|", "_"), + (aName + "_" + aDefault).replaceAll("\\|", "_"), + aDefault); String rResult = tProperty.getString(); if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); return rResult; -- cgit