diff options
author | antihutka <antihutka@gmail.com> | 2023-07-11 19:21:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 19:21:41 +0200 |
commit | 2baadebf9e7dded8fe751e0fe9ee39274925706b (patch) | |
tree | dc197488f861049e76362614b7f32438376f22f3 /src/main | |
parent | 9e884e6eb1a0d5627c95a030e8b50060235bb62d (diff) | |
download | GT5-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')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java | 2 |
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; } |