Show fluid amounts over slots in compact form, without the L

Fluid amounts drawn over slots drop their L, since 1 L is 1 mB, a unit
doesn't fit in a slot and it ignored the L/mB setting anyway. With GTNHLib
loaded they use its compact formatting, so they follow the player's number
settings: exact up to 9,999, then 12.3K, 1.5M, rounded down. Without it
they keep the old short form. Covers the fluid display item, bookmarks,
craftables, the crafting tree and item rows in tooltips. Item counts are
unchanged.
This commit is contained in:
Connor Colenso committed 2026-11-26 23:47:50 +00:00
1 parent a665a5be56
commit b784769426
7 files changed
+27 -48

No files matched your search

@@ -363,17 +363,7 @@ public class BookmarksGridSlot extends ItemsGridSlot {
final float panelFactor = (rect.w - 2) / (DEFAULT_SLOT_SIZE - 2);
final long stackSize = this.bookmarkItem.getStackSize(amount);
int color = 0xFFFFFF;
String amountString = "";
if (stackSize < 10_000) {
amountString = String.valueOf(stackSize);
} else {
amountString = ReadableNumberConverter.INSTANCE.toWideReadableForm(stackSize);
}
if (this.isFluidDisplay) {
amountString += "L";
}
String amountString = NEIClientUtils.formatSlotAmount(stackSize, this.isFluidDisplay);
if (this.bookmarkItem.chance != PositionedStack.CHANCE_FULL) {
amountString = "~" + amountString;