diff options
author | DoKM <54663875+DoKM@users.noreply.github.com> | 2021-09-21 13:45:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-21 13:45:00 +0200 |
commit | 75f6f7ba851fb0f7645da41c26b9c0eb2286512b (patch) | |
tree | a64949e4c9679117c266108f031c3c5e301c2f79 /src/main/java/io | |
parent | 578cf3d6e3ac9cfa62e8ac9b2fc9a630f7951609 (diff) | |
download | NotEnoughUpdates-75f6f7ba851fb0f7645da41c26b9c0eb2286512b.tar.gz NotEnoughUpdates-75f6f7ba851fb0f7645da41c26b9c0eb2286512b.tar.bz2 NotEnoughUpdates-75f6f7ba851fb0f7645da41c26b9c0eb2286512b.zip |
Fix morph pets not working
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java | 6 |
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; |