aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java
diff options
context:
space:
mode:
authorYang Xizhi <60341015+GlodBlock@users.noreply.github.com>2022-09-17 01:27:53 +0800
committerGitHub <noreply@github.com>2022-09-16 19:27:53 +0200
commitc9633115ac7a2deb5a2559b2738c3f340104a961 (patch)
tree5141ad8d5e81eca67029d47a340454d6a575a944 /src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java
parentebae792931298821ba8aa834c83ae50b2c49e5c9 (diff)
downloadGT5-Unofficial-c9633115ac7a2deb5a2559b2738c3f340104a961.tar.gz
GT5-Unofficial-c9633115ac7a2deb5a2559b2738c3f340104a961.tar.bz2
GT5-Unofficial-c9633115ac7a2deb5a2559b2738c3f340104a961.zip
fix overflow cal when max input voltage over max (#80)
* fix overflow cal when max input voltage over max * int - 1
Diffstat (limited to 'src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java')
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java b/src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java
index 5017a143c9..6af5ee9115 100644
--- a/src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java
+++ b/src/main/java/goodgenerator/blocks/tileEntity/PreciseAssembler.java
@@ -194,7 +194,7 @@ public class PreciseAssembler extends GT_MetaTileEntity_TooltipMultiBlockBase_EM
this.mEfficiencyIncrease = 10000;
tRecipe.isRecipeInputEqual(true, inputFluids, getStoredItemFromHatch(bus));
mOutputItems = tRecipe.mOutputs;
- calculateOverclockedNessMulti(
+ calculateOverclockedNessMultiPara(
tRecipe.mEUt,
tRecipe.mDuration,
1,
@@ -234,7 +234,7 @@ public class PreciseAssembler extends GT_MetaTileEntity_TooltipMultiBlockBase_EM
}
mOutputItems = Outputs.getValue().toArray(new ItemStack[0]);
calculateOverclockedNessMultiPara(
- (int) lEUt, time, 1, Math.min(Integer.MAX_VALUE, getMaxInputEnergy_EM()));
+ (int) lEUt, time, 1, Math.min(Integer.MAX_VALUE - 1, getMaxInputEnergy_EM()));
this.updateSlots();
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);