Fix turbine being able to produce energy without using steam when there isn't enough steam to get the flow rate to 1 mB/t
@@ -123,14 +123,15 @@ public class TurbineMultiblockData extends MultiblockData {
rate = Math.min(Math.min(stored, rate), energyNeeded.divide(energyMultiplier).doubleValue()) * proportion;
flowRate = rate / origRate;
+ if (flowRate < 1) {
+ clientFlow = 0;
+ } else {
energyContainer.insert(energyMultiplier.multiply(rate), Action.EXECUTE, AutomationType.INTERNAL);
-
- if (!gasTank.isEmpty()) {
- gasTank.shrinkStack((long) rate, Action.EXECUTE);
- }
- clientFlow = (long) rate;
+ clientFlow = MathUtils.clampToLong(rate);
+ gasTank.shrinkStack(clientFlow, Action.EXECUTE);
ventTank.setStack(new FluidStack(Fluids.WATER, Math.min(MathUtils.clampToInt(rate), condensers * MekanismGeneratorsConfig.generators.condenserRate.get())));
}
+ }
} else {
clientFlow = 0;
}
