aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2022-07-28 19:13:17 +0900
committerGitHub <noreply@github.com>2022-07-28 17:13:17 +0700
commitea1e141ade9465e1748bf23cfd819eab3fa21bf8 (patch)
tree724a2be0804d3bd92f4e355f36262c0f98272233 /src
parent901281ff7916eac35cb35e9c17ce017a561c51d0 (diff)
downloadGT5-Unofficial-ea1e141ade9465e1748bf23cfd819eab3fa21bf8.tar.gz
GT5-Unofficial-ea1e141ade9465e1748bf23cfd819eab3fa21bf8.tar.bz2
GT5-Unofficial-ea1e141ade9465e1748bf23cfd819eab3fa21bf8.zip
Fix negative energy usage for EIC (#170)
Former-commit-id: e908e704ec6bc92899611ad140ea7fdd31b0d13c
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
index db66509b77..7bb70566fb 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
@@ -175,8 +175,13 @@ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity
if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluidInputs, tItemInputs)) {
this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
this.mEfficiencyIncrease = 10000;
- this.mEUt = -tRecipe.mEUt;
calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
+ //In case recipe is too OP for that machine
+ if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
+ return false;
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
this.mOutputItems = tRecipe.mOutputs.clone();
this.mOutputFluids = tRecipe.mFluidOutputs.clone();
if (pistonEnabled) {