aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-09-23 23:33:16 +1000
committerGitHub <noreply@github.com>2022-09-23 15:33:16 +0200
commit61c53c0054431e75826d071dfb363406b5763195 (patch)
treef55192c8e45e7871614a19d611159badac596552 /src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java
parent21a353f09edc1623d339dd9f7eea639b35891d57 (diff)
downloadnotenoughupdates-61c53c0054431e75826d071dfb363406b5763195.tar.gz
notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.tar.bz2
notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.zip
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 <romangraef@gmail.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java7
1 files changed, 7 insertions, 0 deletions
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);
+ }
+
// <editor-fold desc="Resolution Helpers">
private boolean isBazaar(IInventory chest) {
if (chest.getDisplayName().getFormattedText().startsWith("Bazaar ➜ ")) {