aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorbotn365 <42187820+botn365@users.noreply.github.com>2020-09-18 22:31:23 +0200
committerGitHub <noreply@github.com>2020-09-18 22:31:23 +0200
commitefbaa3fcb94da0aea4a4d51519b58df4641e68d9 (patch)
treeb4c0c743b2bd3b8a0c41d7d83f12b3128e76993e /src/main/java/gregtech/api
parent7c7bbd22c83a9057ea5a92d117d82fb2f3f73263 (diff)
downloadGT5-Unofficial-efbaa3fcb94da0aea4a4d51519b58df4641e68d9.tar.gz
GT5-Unofficial-efbaa3fcb94da0aea4a4d51519b58df4641e68d9.tar.bz2
GT5-Unofficial-efbaa3fcb94da0aea4a4d51519b58df4641e68d9.zip
fix energy consumption on OC past tick limit
fix the energy consumption of the large chemical reactor where it would reduce the energy consumption if the it OCd past the tick limit
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index c6828c707e..c41d2ca316 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -617,8 +617,17 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
while (tempEUt <= V[mTier - 1] * mAmperage) {
tempEUt <<= 2;//this actually controls overclocking
//xEUt *= 4;//this is effect of everclocking
+ int oldTime = mMaxProgresstime;
mMaxProgresstime >>= ocTimeShift;//this is effect of overclocking
- xEUt = mMaxProgresstime==0 ? xEUt >> ocTimeShift : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power
+ if (mMaxProgresstime <1)
+ {
+ xEUt *= oldTime * (perfectOC ? 1:2);
+ break;
+ }
+ else
+ {
+ xEUt <<= ocTimeShift;
+ }
}
if(xEUt > Integer.MAX_VALUE - 1) {
mEUt = Integer.MAX_VALUE - 1;