From a75f9d00c99973674633812370364ef3a3f8ee19 Mon Sep 17 00:00:00 2001 From: Michal Povinsky Date: Tue, 11 Jul 2023 05:38:33 +0200 Subject: [PATCH] Make PSS stop pulling input power when it's full. --- .../GregtechMetaTileEntity_PowerSubStationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ private long drawEnergyFromHatch(MetaTileEntity aHatch) { long stored = aHatch.getEUVar(); long voltage = aHatch.maxEUInput() * aHatch.maxAmperesIn(); - if (voltage > stored) { + if (voltage > stored || (voltage + this.getEUVar() > this.mBatteryCapacity)) { return 0; }