aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlueWeabo <76872108+BlueWeabo@users.noreply.github.com>2022-11-24 13:13:09 +0200
committerGitHub <noreply@github.com>2022-11-24 12:13:09 +0100
commit51537482fefc4f9c6d3fbd93d119c333a63dcd7b (patch)
tree406c3dae1d80eb63c56dfb28e80dea7a3b9cc878
parentf7482a536ad7f75d42b1f3089cb1ad882baa261e (diff)
downloadGT5-Unofficial-51537482fefc4f9c6d3fbd93d119c333a63dcd7b.tar.gz
GT5-Unofficial-51537482fefc4f9c6d3fbd93d119c333a63dcd7b.tar.bz2
GT5-Unofficial-51537482fefc4f9c6d3fbd93d119c333a63dcd7b.zip
make long eut base use both tt hatches and normal energy hatches (#1523)
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java
index 0d0d46ba7e..9f311c09ab 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java
@@ -1,5 +1,8 @@
package gregtech.api.metatileentity.implementations;
+import gregtech.api.util.GT_ExoticEnergyInputHelper;
+import java.util.ArrayList;
+import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -86,4 +89,16 @@ public abstract class GT_MetaTileEntity_ExtendedPowerMultiBlockBase<
protected long getActualEnergyUsage() {
return (-this.lEUt * 10000) / Math.max(1000, mEfficiency);
}
+
+ public List<GT_MetaTileEntity_Hatch> getExoticAndNormalEnergyHatchList() {
+ List<GT_MetaTileEntity_Hatch> tHatches = new ArrayList<>();
+ tHatches.addAll(mExoticEnergyHatches);
+ tHatches.addAll(mEnergyHatches);
+ return tHatches;
+ }
+
+ @Override
+ public boolean drainEnergyInput(long aEU) {
+ return GT_ExoticEnergyInputHelper.drainEnergy(aEU, getExoticAndNormalEnergyHatchList());
+ }
}