From 09ebf8a3deb8e2cfb7efce1fefed63c445b78bf1 Mon Sep 17 00:00:00 2001 From: Jakub <53441451+kuba6000@users.noreply.github.com> Date: Fri, 27 Jan 2023 11:17:17 +0100 Subject: Fix total EU implementation (PCB Factory and Nano Forge overclocking fix) (#1693) * Fix total EU implementation * Wrong hatches --- src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java b/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java index 820ec07487..3f57cf758b 100644 --- a/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java +++ b/src/main/java/gregtech/api/util/GT_ExoticEnergyInputHelper.java @@ -58,7 +58,11 @@ public class GT_ExoticEnergyInputHelper { } public static long getTotalEuMulti(Collection hatches) { - return getMaxWorkingInputAmpsMulti(hatches) * getAverageInputVoltageMulti(hatches); + long rEU = 0L; + for (GT_MetaTileEntity_Hatch tHatch : hatches) + if (isValidMetaTileEntity(tHatch)) + rEU += tHatch.getBaseMetaTileEntity().getInputVoltage() * tHatch.maxWorkingAmperesIn(); + return rEU; } public static long getMaxInputVoltageMulti(Collection hatches) { -- cgit