From fbc6a87600fcc06bdbabacf3dc34ce7261ab6c7c Mon Sep 17 00:00:00 2001 From: Madeleaan <70163122+Madeleaan@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:07:47 +0200 Subject: Add gemstone stats (#1210) Co-authored-by: nopo --- .../io/github/moulberry/notenoughupdates/util/ItemUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java index c013ba06..0f67edb4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java @@ -396,7 +396,7 @@ public class ItemUtils { NBTTagCompound display = tag.getCompoundTag("display"); if (display.hasKey("Lore", 9)) { NBTTagList lore = display.getTagList("Lore", 8); - if (Utils.cleanColour(lore.getStringTagAt(0)).matches(ItemTooltipListener.petToolTipRegex) && + if (ItemTooltipListener.petToolTipRegex.matcher(Utils.cleanColour(lore.getStringTagAt(0))).matches() && lore.tagCount() > 7) { PetLeveling.PetLevel petLevel; @@ -412,8 +412,11 @@ public class ItemUtils { int maxLvl = 100; if (Constants.PETS != null && Constants.PETS.has("custom_pet_leveling") && Constants.PETS.getAsJsonObject("custom_pet_leveling").has(pet.petType.toUpperCase(Locale.ROOT)) && - Constants.PETS.getAsJsonObject("custom_pet_leveling").getAsJsonObject(pet.petType.toUpperCase(Locale.ROOT)).has( - "max_level")) { + Constants.PETS + .getAsJsonObject("custom_pet_leveling") + .getAsJsonObject(pet.petType.toUpperCase(Locale.ROOT)) + .has( + "max_level")) { maxLvl = Constants.PETS .getAsJsonObject("custom_pet_leveling") -- cgit