Skip to content

Commit

Permalink
show formatted stacksize
Browse files Browse the repository at this point in the history
  • Loading branch information
slprime committed Feb 21, 2024
1 parent 0477d67 commit 4741d20
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,16 @@ public static void drawItem(int i, int j, ItemStack itemstack, FontRenderer font

if (stackSize == null) {
if (itemstack.stackSize > 1) {
String amountText = ReadableNumberConverter.INSTANCE.toWideReadableForm(itemstack.stackSize);
stackSize = ReadableNumberConverter.INSTANCE.toWideReadableForm(itemstack.stackSize);

if (amountText.length() == 3) {
if (stackSize.length() == 3) {
scale = 0.8f;
} else if (amountText.length() == 4) {
} else if (stackSize.length() == 4) {
scale = 0.6f;
} else if (amountText.length() > 4) {
} else if (stackSize.length() > 4) {
scale = 0.5f;
}

stackSize = String.valueOf(itemstack.stackSize);
} else {
stackSize = "";
}
Expand Down

0 comments on commit 4741d20

Please sign in to comment.