From efbaa3fcb94da0aea4a4d51519b58df4641e68d9 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Fri, 18 Sep 2020 22:31:23 +0200 Subject: 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 --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java') 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; -- cgit