aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkekzdealer <kekzdealer@gmail.com>2020-05-13 13:03:18 +0200
committerkekzdealer <kekzdealer@gmail.com>2020-05-13 13:03:18 +0200
commit18563417fce00037830cb733f4cfc78df514c26e (patch)
treedd5817dea28d842d363d55c3f3e1cd85728b522c /src
parent1731699923f01e166a2c3520a7afe10d7b31e28b (diff)
downloadGT5-Unofficial-18563417fce00037830cb733f4cfc78df514c26e.tar.gz
GT5-Unofficial-18563417fce00037830cb733f4cfc78df514c26e.tar.bz2
GT5-Unofficial-18563417fce00037830cb733f4cfc78df514c26e.zip
Fixed power not being calculated correctly for laser hatches in LSC
Diffstat (limited to 'src')
-rw-r--r--src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
index d81c5eb8c3..b37c88e098 100644
--- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
+++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
@@ -428,9 +428,9 @@ public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_MultiBlock
}
final BigInteger remcapActual = capacity.subtract(stored);
final BigInteger recampLimited = (MAX_LONG.compareTo(remcapActual) > 0) ? remcapActual : MAX_LONG;
- final long power = Math.min(eHatch.maxEUInput() * eHatch.maxAmperesIn(), recampLimited.longValue());
+ final long ttLaserWattage = eHatch.maxEUInput() * eHatch.Amperes - (eHatch.Amperes / 20);
+ final long power = Math.min(ttLaserWattage, recampLimited.longValue());
if(power <= eHatch.getEUVar()) {
- KekzCore.LOGGER.info("Tried to take " + power + "EU from a Laser Target Hatch");
eHatch.setEUVar(eHatch.getEUVar() - power);
stored = stored.add(BigInteger.valueOf(power));
}
@@ -441,9 +441,9 @@ public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_MultiBlock
continue;
}
final BigInteger remStoredLimited = (MAX_LONG.compareTo(stored) > 0) ? stored : MAX_LONG;
- final long power = Math.min(eDynamo.maxEUOutput() * eDynamo.maxAmperesOut(), remStoredLimited.longValue());
+ final long ttLaserWattage = eDynamo.maxEUOutput() * eDynamo.Amperes - (eDynamo.Amperes / 20);
+ final long power = Math.min(ttLaserWattage, remStoredLimited.longValue());
if(eDynamo.getEUVar() <= eDynamo.maxEUStore() - power) {
- KekzCore.LOGGER.info("Tried to inject " + power + "EU into a Laser Source Hatch");
eDynamo.setEUVar(eDynamo.getEUVar() + power);
stored = stored.subtract(BigInteger.valueOf(power));
}