aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDoKM <54663875+DoKM@users.noreply.github.com>2021-09-21 13:45:00 +0200
committerGitHub <noreply@github.com>2021-09-21 13:45:00 +0200
commit75f6f7ba851fb0f7645da41c26b9c0eb2286512b (patch)
treea64949e4c9679117c266108f031c3c5e301c2f79 /src/main/java
parent578cf3d6e3ac9cfa62e8ac9b2fc9a630f7951609 (diff)
downloadNotEnoughUpdates-75f6f7ba851fb0f7645da41c26b9c0eb2286512b.tar.gz
NotEnoughUpdates-75f6f7ba851fb0f7645da41c26b9c0eb2286512b.tar.bz2
NotEnoughUpdates-75f6f7ba851fb0f7645da41c26b9c0eb2286512b.zip
Fix morph pets not working
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index e18571c5..212bb8a4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -2405,7 +2405,7 @@ public class NEUEventListener {
}
//7 is just a random number i chose, prob no pets with less lines than 7
if (event.toolTip.size() > 7) {
- if (Utils.cleanColour(event.toolTip.get(1)).matches("((Farming)|(Combat)|(Fishing)|(Mining)|(Foraging)|(Enchanting)|(Alchemy)) ((Mount)|(Pet)|(Morph)).*")) {
+ if (Utils.cleanColour(event.toolTip.get(1)).matches(petToolTipRegex)) {
GuiProfileViewer.PetLevel petlevel = null;
@@ -2441,12 +2441,14 @@ public class NEUEventListener {
}
return tooltipText;
}
+
+ private static final String petToolTipRegex = "((Farming)|(Combat)|(Fishing)|(Mining)|(Foraging)|(Enchanting)|(Alchemy)) ((Mount)|(Pet)|(Morph)).*";
private void petToolTipXPExtendPetMenu(ItemTooltipEvent event) {
if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.petExtendExp) {
//7 is just a random number i chose, prob no pets with less lines than 7
if (event.toolTip.size() > 7) {
- if (Utils.cleanColour(event.toolTip.get(1)).matches("((Farming)|(Combat)|(Fishing)|(Mining)|(Foraging)|(Enchanting)|(Alchemy)) ((Mount)|(Pet)).*")) {
+ if (Utils.cleanColour(event.toolTip.get(1)).matches(petToolTipRegex)) {
GuiProfileViewer.PetLevel petlevel = null;
int xpLine = -1;