aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-07-19 16:19:14 +0800
committerBuildTools <james.jenour@protonmail.com>2021-07-19 16:19:14 +0800
commitff2829153c14e0f7ca655bfd4ef64bffae3212b2 (patch)
treec3855dbc8775fa082b101c5acd818dc63a306b36 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
parent48f309c1676626e0c8d0128220e50e51247c9abb (diff)
downloadnotenoughupdates-ff2829153c14e0f7ca655bfd4ef64bffae3212b2.tar.gz
notenoughupdates-ff2829153c14e0f7ca655bfd4ef64bffae3212b2.tar.bz2
notenoughupdates-ff2829153c14e0f7ca655bfd4ef64bffae3212b2.zip
PRE29
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
index e7f5c8e6..62a3a5d1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -115,6 +115,7 @@ public class PetInfoOverlay extends TextOverlay {
private static LinkedList<Float> xpGainQueue = new LinkedList<>();
private static float xpGainHourLast = -1;
private static float xpGainHour = -1;
+ private static int pauseCountdown = 0;
private static float xpGainHourSecondPet = -1;
@@ -369,7 +370,15 @@ public class PetInfoOverlay extends TextOverlay {
if(xpGain < 0) xpGain = 0;
String xpGainString = EnumChatFormatting.AQUA + "XP/h: " +
EnumChatFormatting.YELLOW + roundFloat(xpGain);
- if(xpGain > 0 && xpGainHour == xpGainHourLast) xpGainString += EnumChatFormatting.RED + " (PAUSED)";
+ if(!secondPet && xpGain > 0 && levelXp != levelXpLast) {
+ if(pauseCountdown <= 0) {
+ xpGainString += EnumChatFormatting.RED + " (PAUSED)";
+ } else {
+ pauseCountdown--;
+ }
+ } else {
+ pauseCountdown = 60;
+ }
String totalXpString = EnumChatFormatting.AQUA + "Total XP: " + EnumChatFormatting.YELLOW + roundFloat(currentPet.petLevel.totalXp);
@@ -609,7 +618,7 @@ public class PetInfoOverlay extends TextOverlay {
if(petItem) {
ItemStack stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(entry.getValue());
- itemMap.put(stack.getDisplayName(), entry.getKey());
+ itemMap.put(stack.getDisplayName().replace("\u00a7f\u00a7f", ""), entry.getKey());
}
}
}