diff options
author | BlueWeabo <ilia.iliev2005@gmail.com> | 2023-08-02 19:25:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 18:25:29 +0200 |
commit | 8fcd62bd952c6bfa8896fe08e06df514a2b6f9ce (patch) | |
tree | 0cafcf74e50361e4affdc295a4229a192e156644 /src/main | |
parent | 086f7e45131af4ac024924c8267fc1d14da01770 (diff) | |
download | GT5-Unofficial-8fcd62bd952c6bfa8896fe08e06df514a2b6f9ce.tar.gz GT5-Unofficial-8fcd62bd952c6bfa8896fe08e06df514a2b6f9ce.tar.bz2 GT5-Unofficial-8fcd62bd952c6bfa8896fe08e06df514a2b6f9ce.zip |
Fix TT extended Multis using wrong exotic energy input hatches list (#237)
* fix TT extended Multis using wrong exotic energy input hatches list
* go away from using stream and use addAll
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 73 |
1 files changed, 30 insertions, 43 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 82670742af..fa8b819663 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -1989,56 +1989,28 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM return true; } // Use in EM check recipe return statement if you want overclocking - @Override // same as gt sum of all hatches - public long getMaxInputVoltage() { - return getMaxInputVoltageSum(); - } - - // same as gt sum of all hatches + /** + * Use {@link #getMaxInputVoltage()} + */ + @Deprecated public final long getMaxInputVoltageSum() { - long rVoltage = 0; - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage += tHatch.maxEUInput(); - } - } - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - rVoltage += tHatch.maxEUInput(); - } - } - return rVoltage; + return getMaxInputVoltage(); } - // new Method + /** + * Use {@link #getMaxInputEu()} + */ + @Deprecated public final long getMaxInputEnergy() { - long energy = 0; - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - energy += tHatch.maxEUInput() * tHatch.maxAmperesIn(); - } - } - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - energy += tHatch.maxEUInput() * tHatch.maxAmperesIn(); - } - } - return energy; + return getMaxInputEu(); } + /** + * Use {@link #getMaxInputEu()} + */ + @Deprecated public final long getMaxInputEnergy_EM() { - long energy = 0; - for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - energy += tHatch.maxEUInput(); - } - } - for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) { - if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { - energy += tHatch.maxEUInput() * tHatch.Amperes; - } - } - return energy; + return getMaxInputEu(); } // new Method @@ -2055,6 +2027,21 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM return eAmpereFlow; } + @Override + public List<GT_MetaTileEntity_Hatch> getExoticAndNormalEnergyHatchList() { + List<GT_MetaTileEntity_Hatch> list = new ArrayList<>(); + list.addAll(mEnergyHatches); + list.addAll(eEnergyMulti); + return list; + } + + @Override + public List<GT_MetaTileEntity_Hatch> getExoticEnergyHatches() { + List<GT_MetaTileEntity_Hatch> list = new ArrayList<>(); + list.addAll(eEnergyMulti); + return list; + } + // endregion // region convenience copies input and output EM |