aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
diff options
context:
space:
mode:
authorGlodBlock <1356392126@qq.com>2021-11-28 11:47:15 +0800
committerGlodBlock <1356392126@qq.com>2021-11-28 11:47:15 +0800
commit3420f959fd55221710b81a9900f2cbef110bb4ea (patch)
tree0cdf4d747661f3d679fd2eb97542e318dda430f6 /src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
parent95f17298975372f5f09fbaa4c8c40502fcc8acdb (diff)
parenta2836a7364c0967e89b0707e7ca5b1df2320f6d9 (diff)
downloadGT5-Unofficial-3420f959fd55221710b81a9900f2cbef110bb4ea.tar.gz
GT5-Unofficial-3420f959fd55221710b81a9900f2cbef110bb4ea.tar.bz2
GT5-Unofficial-3420f959fd55221710b81a9900f2cbef110bb4ea.zip
Merge branch 'experimental' of https://github.com/GTNewHorizons/GT5-Unofficial into tankchest-rework
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 9176d063ce..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;
@@ -1403,7 +1404,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
}
}
- GT_Pollution.addPollution(this, 100000);
+ GT_Pollution.addPollution(this, GT_Mod.gregtechproxy.mPollutionOnExplosion);
mMetaTileEntity.doExplosion(aAmount);
}
}