diff options
author | Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> | 2023-02-11 12:04:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 13:04:04 +0100 |
commit | 15307a0b42952b0326c2842da5105f62d6ba752d (patch) | |
tree | b1aa0ba00f9cd24ca33bb6ec9b141df325d54892 /src/main/java/gregtech | |
parent | fa5dc2ae3f79b81de5db0dd57e38a880b8bc8d2c (diff) | |
download | GT5-Unofficial-15307a0b42952b0326c2842da5105f62d6ba752d.tar.gz GT5-Unofficial-15307a0b42952b0326c2842da5105f62d6ba752d.tar.bz2 GT5-Unofficial-15307a0b42952b0326c2842da5105f62d6ba752d.zip |
Fix EU consumption displayed on NEI (#1728)
* Fix EU consumption displayed on NEI
* Typo
---------
Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Recipe.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 53b3dd9f9b..524976adc9 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -1,6 +1,7 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.util.GT_Utility.formatNumbers; import static net.minecraft.util.EnumChatFormatting.GRAY; import java.awt.*; @@ -1794,9 +1795,13 @@ public class GT_Recipe implements Comparable<GT_Recipe> { @Override protected void drawNEIEnergyInfo(NEIRecipeInfo recipeInfo) { - Power power = recipeInfo.power; - drawNEIText(recipeInfo, GT_Utility.trans("152", "Total: ") + power.getTotalPowerString()); - drawNEIText(recipeInfo, "Average: " + power.getPowerUsageString()); + // These look odd because recipeInfo.recipe.mEUt is actually the EU per litre of fluid processed, not + // the EU/t. + drawNEIText( + recipeInfo, + GT_Utility.trans("152", "Total: ") + formatNumbers(1000L * recipeInfo.recipe.mEUt) + " EU"); + // 1000 / (20 ticks * 5 seconds) = 10L/t. 10L/t * x EU/L = 10 * x EU/t. + drawNEIText(recipeInfo, "Average: " + formatNumbers(10L * recipeInfo.recipe.mEUt) + " EU/t"); } } @@ -3472,7 +3477,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { } protected String formatSpecialValue(int specialValue) { - return mNEISpecialValuePre + GT_Utility.formatNumbers((long) specialValue * mNEISpecialValueMultiplier) + return mNEISpecialValuePre + formatNumbers((long) specialValue * mNEISpecialValueMultiplier) + mNEISpecialValuePost; } |