aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2021-11-26 23:05:38 +0800
committerGlease <4586901+Glease@users.noreply.github.com>2021-11-26 23:05:38 +0800
commit9090fc1ecc4890f8f2837447b2e0a781fb754f14 (patch)
tree6801e82d3fa3b0f9ac329fad5fc30c86a8aa9777 /src/main
parent9d559f268a78564be4c49e35fc003346d6ae2a7c (diff)
downloadGT5-Unofficial-9090fc1ecc4890f8f2837447b2e0a781fb754f14.tar.gz
GT5-Unofficial-9090fc1ecc4890f8f2837447b2e0a781fb754f14.tar.bz2
GT5-Unofficial-9090fc1ecc4890f8f2837447b2e0a781fb754f14.zip
Reduce innate outbound loss by one tier
This will make LV power networks less annoying to build Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main')
-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 9176d063ce..2d8dd5c910 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;