diff options
author | joegnis <joegnis.yifan@gmail.com> | 2024-09-04 06:53:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 10:53:16 +0000 |
commit | ebefc70b6d41c19c61fc21f548a942a0331f7fb6 (patch) | |
tree | b73c6844fcc8a652c83fb61c8512fa3e87cc1d0a /src/main/java/goodgenerator/blocks | |
parent | ead1385464310f4fddda2c5566d541c187d659fc (diff) | |
download | GT5-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/goodgenerator/blocks')
-rw-r--r-- | src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java | 4 | ||||
-rw-r--r-- | src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java index 6110cf6eeb..6485f0769a 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java @@ -50,7 +50,7 @@ public class MTEComponentAssemblyLine extends MTEExtendedPowerMultiBlockBase<MTE implements ISurvivalConstructable { private int casingTier; - private float speedBonus; + private double speedBonus; protected static final String STRUCTURE_PIECE_MAIN = "main"; private static final IStructureDefinition<MTEComponentAssemblyLine> STRUCTURE_DEFINITION = StructureDefinition .<MTEComponentAssemblyLine>builder() @@ -321,7 +321,7 @@ public class MTEComponentAssemblyLine extends MTEExtendedPowerMultiBlockBase<MTE @Nonnull @Override protected OverclockCalculator createOverclockCalculator(@Nonnull GTRecipe recipe) { - speedBonus = (float) (1 / Math.pow(2, casingTier + 1 - recipe.mSpecialValue)); + speedBonus = 1 / Math.pow(2, casingTier + 1 - recipe.mSpecialValue); return super.createOverclockCalculator(recipe).setSpeedBoost(speedBonus); } }; diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java index 840688dff7..4ff0288a28 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java @@ -258,7 +258,7 @@ public class MTEPreciseAssembler extends MTEExtendedPowerMultiBlockBase<MTEPreci @Nonnull @Override protected OverclockCalculator createOverclockCalculator(@Nonnull GTRecipe recipe) { - return super.createOverclockCalculator(recipe).setSpeedBoost(mode == 0 ? 1 : 0.5F); + return super.createOverclockCalculator(recipe).setSpeedBoost(mode == 0 ? 1 : 0.5); } }.setMaxParallelSupplier(() -> mode == 0 ? 1 : (int) Math.pow(2, 4 + (casingTier + 1))); } |