aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorantihutka <antihutka@gmail.com>2023-07-11 19:21:41 +0200
committerGitHub <noreply@github.com>2023-07-11 19:21:41 +0200
commit2baadebf9e7dded8fe751e0fe9ee39274925706b (patch)
treedc197488f861049e76362614b7f32438376f22f3 /src/main/java/gtPlusPlus/xmod
parent9e884e6eb1a0d5627c95a030e8b50060235bb62d (diff)
downloadGT5-Unofficial-2baadebf9e7dded8fe751e0fe9ee39274925706b.tar.gz
GT5-Unofficial-2baadebf9e7dded8fe751e0fe9ee39274925706b.tar.bz2
GT5-Unofficial-2baadebf9e7dded8fe751e0fe9ee39274925706b.zip
Make PSS stop pulling input power when it's full. (#687)
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
index 9596aebcd7..801fad2af1 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
@@ -590,7 +590,7 @@ public class GregtechMetaTileEntity_PowerSubStationController
long stored = aHatch.getEUVar();
long voltage = aHatch.maxEUInput() * aHatch.maxAmperesIn();
- if (voltage > stored) {
+ if (voltage > stored || (voltage + this.getEUVar() > this.mBatteryCapacity)) {
return 0;
}