diff options
author | Martin Robertz <dream-master@gmx.net> | 2020-09-09 13:37:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 13:37:07 +0200 |
commit | 1af71cbcb6cfd20e4e509d911dc6a6fcbeff446c (patch) | |
tree | 2da6986a6e1ba7cf20442d8d6e7d218fde083206 | |
parent | a86d05483bb7eda87d89e9bf347a4517da228416 (diff) | |
parent | edbf6cb86a352a4b84a09f85b5869ba41ba35563 (diff) | |
download | GT5-Unofficial-1af71cbcb6cfd20e4e509d911dc6a6fcbeff446c.tar.gz GT5-Unofficial-1af71cbcb6cfd20e4e509d911dc6a6fcbeff446c.tar.bz2 GT5-Unofficial-1af71cbcb6cfd20e4e509d911dc6a6fcbeff446c.zip |
Merge pull request #313 from GTNewHorizons/patch-lgt-underflow
Fix GTNewHorizons/GT-New-Horizons-Modpack#6586
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 8e29d620c3..4bd44ef80c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -88,6 +88,17 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); + + if (aOptFlow < fuelValue) { + // turbine too weak and/or fuel too powerful + // at least consume 1L + this.realOptFlow = 1; + // wastes the extra fuel and generate aOptFlow directly + depleteInput(new FluidStack(firstFuelType, 1)); + this.storedFluid += 1; + return GT_Utility.safeInt((long)aOptFlow * (long)aBaseEff / 10000L); + } + actualOptimalFlow = GT_Utility.safeInt((long)aOptFlow / fuelValue); this.realOptFlow = actualOptimalFlow; |