diff options
author | RecursivePineapple <recursive_pineapple@proton.me> | 2024-09-28 07:07:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-28 13:07:26 +0200 |
commit | 254a3bc734648c97e136f67d714dcf5a4f8a3df9 (patch) | |
tree | 294753ced649a9f2d4822b028172b5b2a62d06d4 /src/main/java/goodgenerator | |
parent | 6a12f69212c14e325e292efa78c6dc721bdece0a (diff) | |
download | GT5-Unofficial-254a3bc734648c97e136f67d714dcf5a4f8a3df9.tar.gz GT5-Unofficial-254a3bc734648c97e136f67d714dcf5a4f8a3df9.tar.bz2 GT5-Unofficial-254a3bc734648c97e136f67d714dcf5a4f8a3df9.zip |
Fix large essentia smelter EU usage (#3292)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/goodgenerator')
-rw-r--r-- | src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java index 40f01fbde4..43d066d5b5 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java @@ -41,6 +41,7 @@ import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.recipe.check.SimpleCheckRecipeResult; import gregtech.api.render.TextureFactory; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.OverclockCalculator; import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; import tectech.thing.metaTileEntity.multi.base.TTMultiblockBase; import thaumcraft.api.aspects.Aspect; @@ -363,14 +364,18 @@ public class MTELargeEssentiaSmeltery extends MTETooltipMultiBlockBaseEM this.drainNodePower(WORLD, x, y, z); this.nodePower -= expectedPower(); - calculatePerfectOverclockedNessMulti( - RECIPE_EUT, - (int) Math.ceil(this.mOutputAspects.visSize() * RECIPE_DURATION * (1 - this.nodeIncrease * 0.005)), - 1, - Math.min(Integer.MAX_VALUE, getMaxInputEnergy_EM())); + OverclockCalculator calculator = new OverclockCalculator().setRecipeEUt(RECIPE_EUT) + .setEUt(getMaxInputEu()) + .setDuration( + (int) Math.ceil(this.mOutputAspects.visSize() * RECIPE_DURATION * (1 - this.nodeIncrease * 0.005))) + .setDurationDecreasePerOC(4) + .calculate(); + + useLongPower = true; + lEUt = -calculator.getConsumption(); + mMaxProgresstime = calculator.getDuration(); this.updateSlots(); - if (this.mEUt > 0) this.mEUt = -this.mEUt; return CheckRecipeResultRegistry.SUCCESSFUL; } |