Add max energy to tooltips

This commit is contained in:
Tom Elfring committed 2017-07-17 20:27:05 +02:00
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.