aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java
index 5b983ddc1b..c1893f50c1 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGasAdvanced.java
@@ -24,6 +24,7 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
+import gregtech.api.util.TurbineStatCalculator;
public class MTELargeTurbineGasAdvanced extends MTELargeTurbine {
@@ -127,8 +128,7 @@ public class MTELargeTurbineGasAdvanced extends MTELargeTurbine {
}
@Override
- int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier,
- float[] flowMultipliers) {
+ int fluidIntoPower(ArrayList<FluidStack> aFluids, TurbineStatCalculator turbine) {
if (aFluids.size() >= 1) {
int tEU = 0;
int actualOptimalFlow = 0;
@@ -141,17 +141,17 @@ public class MTELargeTurbineGasAdvanced extends MTELargeTurbine {
return 0;
}
- if (aOptFlow < fuelValue) {
+ if (turbine.getOptimalGasEUt() < 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 GTUtility.safeInt((long) aOptFlow * (long) aBaseEff / 10000L);
+ return GTUtility.safeInt((long) turbine.getOptimalGasEUt());
}
- actualOptimalFlow = GTUtility.safeInt((long) (aOptFlow * flowMultipliers[1] / fuelValue));
+ actualOptimalFlow = GTUtility.safeInt((long) (turbine.getOptimalGasFlow() / fuelValue));
this.realOptFlow = actualOptimalFlow;
// Allowed to use up to 450% optimal flow rate, depending on the value of overflowMultiplier.
@@ -163,7 +163,8 @@ public class MTELargeTurbineGasAdvanced extends MTELargeTurbine {
// - 300% if it is 2
// - 450% if it is 3
// Variable required outside of loop for multi-hatch scenarios.
- int remainingFlow = GTUtility.safeInt((long) (actualOptimalFlow * (1.5f * overflowMultiplier)));
+ int remainingFlow = GTUtility
+ .safeInt((long) (actualOptimalFlow * (1.5f * turbine.getOverflowEfficiency())));
int flow = 0;
int totalFlow = 0;
@@ -181,10 +182,10 @@ public class MTELargeTurbineGasAdvanced extends MTELargeTurbine {
tEU = GTUtility.safeInt((long) totalFlow * fuelValue);
if (totalFlow != actualOptimalFlow) {
- float efficiency = getOverflowEfficiency(totalFlow, actualOptimalFlow, overflowMultiplier);
+ float efficiency = getOverflowEfficiency(totalFlow, actualOptimalFlow, turbine.getOverflowEfficiency());
tEU *= efficiency;
}
- tEU = GTUtility.safeInt((long) tEU * (long) aBaseEff / 10000L);
+ tEU = GTUtility.safeInt((long) (tEU * turbine.getGasEfficiency()));
// If next output is above the maximum the dynamo can handle, set it to the maximum instead of exploding the
// turbine