From 61c53c0054431e75826d071dfb363406b5763195 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Fri, 23 Sep 2022 23:33:16 +1000 Subject: Pet overlay fixes (#290) * fixed pet overlay going to level 100 * fixed transparent pet and equip overlay not using the special texture fixed pet overlay showing a pet when you remove your pet * made pet overlay show the current stats of your pet * Fixed pet overlay showing Until level 100.0 * Fixed pet stats not showing decimal * Made pet overlay show xp to next level * 2.1.md slight smile * Try to generify pet lore replacements a tiny bit Also move pets page to use the same code as the pet overlay Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: nea --- .../moulberry/notenoughupdates/util/ItemResolutionQuery.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java index 75086b1f..4d3b4645 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java @@ -138,6 +138,13 @@ public class ItemResolutionQuery { return manager.jsonToStack(jsonObject); } + @Nullable + public ItemStack resolveToItemStack(boolean useReplacements) { + JsonObject jsonObject = resolveToItemListJson(); + if (jsonObject == null) return null; + return manager.jsonToStack(jsonObject, false, useReplacements); + } + // private boolean isBazaar(IInventory chest) { if (chest.getDisplayName().getFormattedText().startsWith("Bazaar ➜ ")) { -- cgit