mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-20 20:22:28 +00:00
format numbers with ,
This commit is contained in:
1 parent
66d9f79517
commit
c5352d399a
6 files changed
+6
-6
No files matched your search
@@ -61,7 +61,7 @@ public class TankFluidHandler implements IWailaDataProvider {
|
||||
int liquidAmount = stack != null ? stack.amount : 0;
|
||||
int capacity = tank != null ? tank.capacity : 0;
|
||||
|
||||
currenttip.add(String.format("%d / %d %s", liquidAmount, capacity, ConfigHandler.instance().fluidUnit));
|
||||
currenttip.add(String.format("%,d / %,d %s", liquidAmount, capacity, ConfigHandler.instance().fluidUnit));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class DrumFluidHandler implements IWailaDataProvider {
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
int amount = tanks[0].fluid == null ? 0 : tanks[0].fluid.amount;
|
||||
currenttip.add(String.format("%d / %d %s", amount, tanks[0].capacity, ConfigHandler.instance().fluidUnit));
|
||||
currenttip.add(String.format("%,d / %,d %s", amount, tanks[0].capacity, ConfigHandler.instance().fluidUnit));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class TankFluidHandler implements IWailaDataProvider {
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
int amount = tanks[0].fluid == null ? 0 : tanks[0].fluid.amount;
|
||||
currenttip.add(String.format("%d / %d %s", amount, tanks[0].capacity, ConfigHandler.instance().fluidUnit));
|
||||
currenttip.add(String.format("%,d / %,d %s", amount, tanks[0].capacity, ConfigHandler.instance().fluidUnit));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class TankFluidHandler implements IWailaDataProvider {
|
||||
FluidStack fluid = tank.getFluid();
|
||||
int amount = fluid == null ? 0 : fluid.amount;
|
||||
|
||||
currenttip.add(String.format("%d / %d %s", amount, tank.getCapacity(), ConfigHandler.instance().fluidUnit));
|
||||
currenttip.add(String.format("%,d / %,d %s", amount, tank.getCapacity(), ConfigHandler.instance().fluidUnit));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class FluiductFluidHandler implements IWailaDataProvider {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
currenttip.add(String.format("%d / %d %s", amount, capacity, ConfigHandler.instance().fluidUnit));
|
||||
currenttip.add(String.format("%,d / %,d %s", amount, capacity, ConfigHandler.instance().fluidUnit));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class TankFluidHandler implements IWailaDataProvider {
|
||||
int amount = (Integer) ThermalExpansionModule.TileTank_getTankAmount.invoke(accessor.getTileEntity());
|
||||
int capacity = (Integer) ThermalExpansionModule.TileTank_getTankCapacity.invoke(accessor.getTileEntity());
|
||||
|
||||
currenttip.add(String.format("%d / %d %s", amount, capacity, ConfigHandler.instance().fluidUnit));
|
||||
currenttip.add(String.format("%,d / %,d %s", amount, capacity, ConfigHandler.instance().fluidUnit));
|
||||
|
||||
} catch (Exception e) {
|
||||
WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
|
||||
Reference in new issue
Block a user