diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2024-07-06 23:55:15 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-06 15:55:15 +0200 |
| commit | e6589dc1d0950536a46c2cfbc7058aa0c387e7b4 (patch) | |
| tree | 364e8a45fd62899db1779bf655b601f5b6402138 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | |
| parent | b42ce02c4ac30814597f66b9b1758a768da082a6 (diff) | |
| download | notenoughupdates-e6589dc1d0950536a46c2cfbc7058aa0c387e7b4.tar.gz notenoughupdates-e6589dc1d0950536a46c2cfbc7058aa0c387e7b4.tar.bz2 notenoughupdates-e6589dc1d0950536a46c2cfbc7058aa0c387e7b4.zip | |
Fix Tier boosted pets in /pv (#1211)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 10 |
1 files changed, 10 insertions, 0 deletions
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; + } } |
