mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-27 23:46:01 +00:00
Format numbers migration (#57)
Co-authored-by: Connor Colenso <[email protected]> Co-authored-by: Connor Colenso <colen@CONNORSPC>
This commit is contained in:
9 files changed
+18
-10
No files matched your search
@@ -7,5 +7,6 @@ public class LoadedMods {
|
||||
public static boolean FORGE_MULTIPART = Loader.isModLoaded("ForgeMultipart");
|
||||
public static boolean NEI = Loader.isModLoaded("NotEnoughItems");
|
||||
public static boolean GT5U = Loader.isModLoaded("gregtech_nh");
|
||||
public static boolean GTNH_LIB = Loader.isModLoaded("gtnhlib");
|
||||
public static boolean WAILA_PLUGINS = Loader.isModLoaded("wailaplugins");
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
package mcp.mobius.waila.utils;
|
||||
|
||||
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import gregtech.api.util.GTUtility;
|
||||
|
||||
public class NumberFormatter {
|
||||
|
||||
private static NumberFormat numberFormat = NumberFormat.getInstance(getCurrentLocale());
|
||||
|
||||
public static String format(long number) {
|
||||
if (LoadedMods.GT5U) {
|
||||
return GTUtility.formatNumbers(number);
|
||||
if (LoadedMods.GTNH_LIB) {
|
||||
return formatNumber(number);
|
||||
}
|
||||
|
||||
return numberFormat.format(number);
|
||||
|
||||
Reference in new issue
Block a user