mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-26 23:13:10 +00:00
Use formatNumber from GTNHLib
This commit is contained in:
1 parent
0214437bc6
commit
adcde8bcab
2 files changed
+4
-3
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");
|
||||
}
|
||||
@@ -5,15 +5,15 @@ import java.util.Locale;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import gregtech.api.util.GTUtility;
|
||||
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||
|
||||
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