aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities
diff options
context:
space:
mode:
authorjoegnis <joegnis.yifan@gmail.com>2024-09-04 06:53:16 -0400
committerGitHub <noreply@github.com>2024-09-04 10:53:16 +0000
commitebefc70b6d41c19c61fc21f548a942a0331f7fb6 (patch)
treeb73c6844fcc8a652c83fb61c8512fa3e87cc1d0a /src/main/java/gregtech/common/tileentities
parentead1385464310f4fddda2c5566d541c187d659fc (diff)
downloadGT5-Unofficial-ebefc70b6d41c19c61fc21f548a942a0331f7fb6.tar.gz
GT5-Unofficial-ebefc70b6d41c19c61fc21f548a942a0331f7fb6.tar.bz2
GT5-Unofficial-ebefc70b6d41c19c61fc21f548a942a0331f7fb6.zip
Fixes #17207 (#3041)
Changed methods in OverclockCalculator: - setEUtDiscount - setSpeedBoost - setHeatDiscountMultiplier Most of other changes are directly related to them. Adds a unit test. Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/common/tileentities')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/MTEPCBFactory.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEPCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEPCBFactory.java
index e7221ef4e1..e815c10a03 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEPCBFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEPCBFactory.java
@@ -571,7 +571,7 @@ public class MTEPCBFactory extends MTEExtendedPowerMultiBlockBase<MTEPCBFactory>
@Override
protected OverclockCalculator createOverclockCalculator(@Nonnull GTRecipe recipe) {
return super.createOverclockCalculator(recipe).setNoOverclock(isNoOC())
- .setEUtDiscount((float) Math.sqrt(mUpgradesInstalled == 0 ? 1 : mUpgradesInstalled))
+ .setEUtDiscount(Math.sqrt(mUpgradesInstalled == 0 ? 1 : mUpgradesInstalled))
.setSpeedBoost(getDurationMultiplierFromRoughness())
.setDurationDecreasePerOC(mOCTier2 ? 4.0 : 2.0);
}
@@ -590,8 +590,8 @@ public class MTEPCBFactory extends MTEExtendedPowerMultiBlockBase<MTEPCBFactory>
return !mOCTier1 && !mOCTier2;
}
- private float getDurationMultiplierFromRoughness() {
- return (float) Math.pow(mRoughnessMultiplier, 2);
+ private double getDurationMultiplierFromRoughness() {
+ return Math.pow(mRoughnessMultiplier, 2);
}
private int ticker = 0;