aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-11-27 20:31:00 +0100
committerGitHub <noreply@github.com>2021-11-27 20:31:00 +0100
commita2836a7364c0967e89b0707e7ca5b1df2320f6d9 (patch)
tree0cdf4d747661f3d679fd2eb97542e318dda430f6 /src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
parentf05038a7947f6d02cedb3ddd72420dad6ca8b00f (diff)
parent9090fc1ecc4890f8f2837447b2e0a781fb754f14 (diff)
downloadGT5-Unofficial-a2836a7364c0967e89b0707e7ca5b1df2320f6d9.tar.gz
GT5-Unofficial-a2836a7364c0967e89b0707e7ca5b1df2320f6d9.tar.bz2
GT5-Unofficial-a2836a7364c0967e89b0707e7ca5b1df2320f6d9.zip
Merge pull request #755 from GTNewHorizons/patch-outbound-loss-reduce
Reduce innate outbound loss by one tier
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index a0a5e75b54..bd2dbcd630 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -481,7 +481,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
- long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
+ long tOutputVoltage = Math.max(oOutput, oOutput + (1L << Math.max(0, GT_Utility.getTier(oOutput) - 1))),
+ tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
if (tUsableAmperage > 0) {
long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
mAverageEUOutput[mAverageEUOutputIndex] += tEU;