mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Add max energy to tooltips
This commit is contained in:
1 parent
b3f1a9fee4
commit
f6c126af44
30 files changed
+45
-32
No files matched your search
@@ -1098,6 +1098,19 @@ public final class MekanismUtils
|
||||
|
||||
return "error";
|
||||
}
|
||||
|
||||
public static String getEnergyDisplay(double energy, double max)
|
||||
{
|
||||
if(energy == Double.MAX_VALUE)
|
||||
{
|
||||
return LangUtils.localize("gui.infinite");
|
||||
}
|
||||
|
||||
String energyString = getEnergyDisplay(energy);
|
||||
String maxString = getEnergyDisplay(max);
|
||||
|
||||
return energyString + "/" + maxString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert from the unit defined in the configuration to joules.
|
||||
|
||||
Reference in new issue
Block a user