aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java47
1 files changed, 37 insertions, 10 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 4d11bdaef5..86ed51e879 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -95,16 +95,9 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
if (looseFit) {
- aOptFlow *= 4;
- if (aBaseEff > 10000) {
- aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f);
- aBaseEff = 7500;
- } else if (aBaseEff > 7500) {
- aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f);
- aBaseEff *= 0.75f;
- } else {
- aBaseEff *= 0.75f;
- }
+ long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff);
+ aOptFlow = GT_Utility.safeInt(calculatedFlow[0]);
+ aBaseEff = GT_Utility.safeInt(calculatedFlow[1]);
}
int tEU = 0;
int totalFlow = 0; // Byproducts are based on actual flow
@@ -144,6 +137,40 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
return tEU;
}
+ public static long[] calculateLooseFlow(int aOptFlow, int aBaseEff) {
+ aOptFlow *= 4;
+ if(aBaseEff>=26000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 8000) / 10000F) * 20f);
+ aBaseEff *= 0.6f;
+ }else if(aBaseEff>22000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7000) / 10000F) * 20f);
+ aBaseEff *= 0.65f;
+ }else if(aBaseEff>18000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 6000) / 10000F) * 20f);
+ aBaseEff *= 0.70f;
+ }else if(aBaseEff>14000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 5000) / 10000F) * 20f);
+ aBaseEff *= 0.75f;
+ }else if(aBaseEff>10000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 4000) / 10000F) * 20f);
+ aBaseEff *= 0.8f;
+ }else if(aBaseEff>6000) {
+ aOptFlow *= Math.pow(1.1f, ((aBaseEff - 3000) / 10000F) * 20f);
+ aBaseEff *= 0.85f;
+ }else{
+ aBaseEff *= 0.9f;
+ }
+
+ if (aBaseEff % 100 != 0){
+ aBaseEff -= aBaseEff % 100;
+ }
+
+ long[] looseFlow = new long[2];
+ looseFlow[0] = GT_Utility.safeInt(aOptFlow);
+ looseFlow[1] = GT_Utility.safeInt(aBaseEff);
+ return looseFlow;
+ }
+
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing()) {