diff options
author | boubou19 <miisterunknown@gmail.com> | 2023-12-17 20:52:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 11:52:19 -0800 |
commit | 0eeb22bc3bf00bf845234e99de185bde9889889c (patch) | |
tree | dd130dabe72448b2367928edc19e9c90a71a3771 /src/main/java | |
parent | bbaf2ced7ee55843884d8bd8cb2ad511e3a53361 (diff) | |
download | GT5-Unofficial-0eeb22bc3bf00bf845234e99de185bde9889889c.tar.gz GT5-Unofficial-0eeb22bc3bf00bf845234e99de185bde9889889c.tar.bz2 GT5-Unofficial-0eeb22bc3bf00bf845234e99de185bde9889889c.zip |
fix IOOBE when there is no fuel fluids (#808)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java index 5a0629fe5d..985c4e3e40 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java @@ -177,7 +177,10 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur // Reduce produced power depending on the ratio between fuel value and turbine EU/t with the following // formula: // EU/t = EU/t * MIN(1, ( ( (FuelValue / 200) ^ 2 ) / EUPerTurbine)) - int fuelValue = getFuelValue(new FluidStack(tFluids.get(0), 0)); + int fuelValue = 0; + if (tFluids.size() > 0) { + fuelValue = getFuelValue(new FluidStack(tFluids.get(0), 0)); + } float magicValue = (fuelValue * 0.005f) * (fuelValue * 0.005f); float efficiencyLoss = Math.min(1.0f, magicValue / euPerTurbine); newPower *= efficiencyLoss; |