From e6589dc1d0950536a46c2cfbc7058aa0c387e7b4 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 6 Jul 2024 23:55:15 +1000 Subject: Fix Tier boosted pets in /pv (#1211) --- .../java/io/github/moulberry/notenoughupdates/util/Utils.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 832b75d0..041bf104 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -28,6 +28,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.TooltipTextScrolling; +import io.github.moulberry.notenoughupdates.miscfeatures.PetInfoOverlay; import io.github.moulberry.notenoughupdates.miscfeatures.SlotLocking; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import lombok.var; @@ -2423,4 +2424,13 @@ public class Utils { } return renderText; } + + public static boolean canPetBeTierBoosted(PetInfoOverlay.Pet pet, PetInfoOverlay.Rarity rarityToBeBoostedTo) { + if (rarityToBeBoostedTo == null) return false; + ItemStack itemStack = NotEnoughUpdates.INSTANCE.manager + .createItemResolutionQuery() + .withKnownInternalName(pet.petType + ";" + rarityToBeBoostedTo.petId) + .resolveToItemStack(false); + return itemStack != null; + } } -- cgit