From 408a07ef2483f5c1878003c88ef960ddffcfe414 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 11:42:53 +0200 Subject: [PATCH 01/10] Update GT_MetaTileEntity_LargeTurbine_HPSteam.java --- .../multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index aa1f46af..fb399839 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -103,13 +103,13 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow)); if(totalFlow>aOptFlow){efficiency = 1.0f;} tEU *= efficiency; - tEU = Math.max(1, tEU * aBaseEff / 10000); + tEU = Math.max(1, tEU * (aBaseEff / 10000)); } else { - tEU = tEU * aBaseEff / 10000; + tEU = tEU * (aBaseEff / 10000); } return tEU; } -} \ No newline at end of file +} From 4c60c1e41ee4f58e359d503206ec6ac52539d360 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 11:49:18 +0200 Subject: [PATCH 02/10] Update GT_MetaTileEntity_LargeTurbine_Gas.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 c5507e0b..90dc8b37 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 @@ -114,9 +114,9 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT if (efficiency < 0) efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency; - tEU = Math.max(1, tEU * aBaseEff / 10000); + tEU = Math.max(1, tEU * (aBaseEff / 10000)); } else { - tEU = tEU * aBaseEff / 10000; + tEU = tEU * (aBaseEff / 10000); } return tEU; @@ -126,4 +126,4 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT } -} \ No newline at end of file +} From 9b3d7149cfc846b8b6cac06fcfec36d0be44dd17 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 11:50:05 +0200 Subject: [PATCH 03/10] Update GT_MetaTileEntity_LargeTurbine_Plasma.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 923eaabc..846490d1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -130,9 +130,9 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if (efficiency < 0) efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency; - tEU = Math.max(1, tEU * aBaseEff / 10000); + tEU = Math.max(1, tEU * (aBaseEff / 10000)); } else { - tEU = tEU * aBaseEff / 10000; + tEU = tEU * (aBaseEff / 10000); } return tEU; From 0c3a42aa7ddde9fa0af66727a10faf0447728607 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 11:56:53 +0200 Subject: [PATCH 04/10] Update GT_MetaTileEntity_LargeTurbine.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 8fd31a9d..7afaf5eb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -163,7 +163,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M this.mMaxProgresstime = 1; this.mEfficiencyIncrease = (10); if(this.mDynamoHatches.size()>0){ - if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (mEUt * mEfficiency) / 10000){ + if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (int)((long)mEUt * (long)mEfficiency) / (long)10000){ explodeMultiblock();} } return true; @@ -223,4 +223,4 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M return true; } -} \ No newline at end of file +} From 734a2903024eb22b2099b18e42a5a55904aaadd7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 12:09:49 +0200 Subject: [PATCH 05/10] Update GT_MetaTileEntity_LargeTurbine.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 7afaf5eb..effe625a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -163,7 +163,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M this.mMaxProgresstime = 1; this.mEfficiencyIncrease = (10); if(this.mDynamoHatches.size()>0){ - if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (int)((long)mEUt * (long)mEfficiency) / (long)10000){ + if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (int)((long)mEUt * (long)mEfficiency) / 10000L){ explodeMultiblock();} } return true; From c52ff67fd6cbb581af47b84d7147c0dd41081f88 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 12:15:02 +0200 Subject: [PATCH 06/10] Update GT_MetaTileEntity_LargeTurbine_Gas.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 90dc8b37..963a4efc 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 @@ -114,9 +114,9 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT if (efficiency < 0) efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency; - tEU = Math.max(1, tEU * (aBaseEff / 10000)); + tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 10000L)); } else { - tEU = tEU * (aBaseEff / 10000); + tEU = (int)((long)tEU * (long)aBaseEff / 10000L); } return tEU; From 568aca180418aa9ff1dae0a2a60d7b756d20d6bc Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 12:15:19 +0200 Subject: [PATCH 07/10] Update GT_MetaTileEntity_LargeTurbine_HPSteam.java --- .../multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index fb399839..8447b748 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -103,9 +103,9 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow)); if(totalFlow>aOptFlow){efficiency = 1.0f;} tEU *= efficiency; - tEU = Math.max(1, tEU * (aBaseEff / 10000)); + tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 10000L)); } else { - tEU = tEU * (aBaseEff / 10000); + tEU = (int)((long)tEU * (long)aBaseEff / 10000L); } return tEU; From 90b1f5b9109dd5a3c4ef73cdeeee9776b94c24ea Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 12:15:34 +0200 Subject: [PATCH 08/10] Update GT_MetaTileEntity_LargeTurbine_Plasma.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 846490d1..6abe8105 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -130,9 +130,9 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if (efficiency < 0) efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency; - tEU = Math.max(1, tEU * (aBaseEff / 10000)); + tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 10000L)); } else { - tEU = tEU * (aBaseEff / 10000); + tEU = (int)((long)tEU * (long)aBaseEff / 10000L); } return tEU; From b25332780a5ebd45dd2639d448f42d224f4f9cb2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 12:16:06 +0200 Subject: [PATCH 09/10] Update GT_MetaTileEntity_LargeTurbine_Steam.java --- .../multi/GT_MetaTileEntity_LargeTurbine_Steam.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 1023235c..262d7bb7 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 @@ -111,11 +111,11 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow)); if(totalFlow>aOptFlow){efficiency = 1.0f;} tEU *= efficiency; - tEU = Math.max(1, tEU * aBaseEff / 20000); + tEU = Math.max(1, (int)((long)tEU * (long)aBaseEff / 20000L)); } else { - tEU = tEU * aBaseEff / 20000; + tEU = (int)((long)tEU * (long)aBaseEff / 20000L); } return tEU; } -} \ No newline at end of file +} From 735f76c64964afedce9a303f70920accb5b6bac7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Sep 2016 12:18:17 +0200 Subject: [PATCH 10/10] Update GT_MetaTileEntity_LargeTurbine.java --- .../machines/multi/GT_MetaTileEntity_LargeTurbine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index effe625a..b42d14cd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -163,7 +163,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M this.mMaxProgresstime = 1; this.mEfficiencyIncrease = (10); if(this.mDynamoHatches.size()>0){ - if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (int)((long)mEUt * (long)mEfficiency) / 10000L){ + if(this.mDynamoHatches.get(0).getBaseMetaTileEntity().getOutputVoltage() < (int)((long)mEUt * (long)mEfficiency / 10000L)){ explodeMultiblock();} } return true;