diff options
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java index 6c43f14b..adb3ce4c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java @@ -723,14 +723,19 @@ public class BasicPage extends GuiProfileViewerPage { EnumChatFormatting.GRAY + "Progress: " + EnumChatFormatting.GOLD + "MAXED!"); } else { int maxXp = (int) level.maxXpForLevel; + float currentXp = ((level.level % 1) * maxXp); + String currentProgressPercentage = StringUtils.formatToTenths((currentXp / maxXp) * 100); + getInstance() .tooltipToDisplay.add( EnumChatFormatting.GRAY + "Progress: " + EnumChatFormatting.DARK_PURPLE + - StringUtils.shortNumberFormat(Math.round((level.level % 1) * maxXp)) + + StringUtils.shortNumberFormat(Math.round(currentXp)) + "/" + - StringUtils.shortNumberFormat(maxXp)); + StringUtils.shortNumberFormat(maxXp) + + EnumChatFormatting.DARK_GRAY + " (" + currentProgressPercentage + "% to " + + ((int) level.level + 1) + ")"); } String totalXpS = StringUtils.formatNumber((long) level.totalXp); tooltipToDisplay.add(EnumChatFormatting.GRAY + "Total XP: " + EnumChatFormatting.DARK_PURPLE + totalXpS + |
