aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2024-08-12 21:03:45 +1000
committerGitHub <noreply@github.com>2024-08-12 13:03:45 +0200
commita5112c0fe80ef77b15ff52651df45cb80e0ec803 (patch)
tree36d7a0dc35e0f38973358cbc87a65ce8c447834c
parenteefd72b3e00670588f95d06dd3cceb392be8a21f (diff)
downloadnotenoughupdates-a5112c0fe80ef77b15ff52651df45cb80e0ec803.tar.gz
notenoughupdates-a5112c0fe80ef77b15ff52651df45cb80e0ec803.tar.bz2
notenoughupdates-a5112c0fe80ef77b15ff52651df45cb80e0ec803.zip
meta: Fix muesum page using cached items instead of actual items (#1312)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MuseumPage.java6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index f9e55203..402a04ce 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -1524,6 +1524,7 @@ public class NEUManager {
if (useReplacements) useCache = false;
if (json == null) return new ItemStack(Items.painting, 1, 10);
String internalname = json.get("internalname").getAsString();
+ if ("_".equals(internalname)) useCache = false;
if (useCache) {
ItemStack stack = itemstackCache.get(internalname);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MuseumPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MuseumPage.java
index 6bcf4405..a845ab14 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MuseumPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/MuseumPage.java
@@ -305,7 +305,7 @@ public class MuseumPage extends GuiProfileViewerPage {
for (int i = startIndex; i < endIndex; i++) {
JsonArray items = specialItems.get(i);
JsonObject item = (JsonObject) items.get(0);
- ItemStack stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(item, true);
+ ItemStack stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(item, false);
if (slot % 7 == 0 && slot > 1) {
slot = 0;
@@ -366,7 +366,7 @@ public class MuseumPage extends GuiProfileViewerPage {
if (!Objects.equals(item.get("internalname").getAsString(), "_")) {
actualItem = true;
}
- stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(item, true);
+ stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(item, false);
}
if ((mouseX >= x && mouseX <= x + 16) &&
@@ -453,7 +453,7 @@ public class MuseumPage extends GuiProfileViewerPage {
ItemStack stack = new ItemStack(Blocks.barrier);
if (!is_five || i < 5) {
JsonObject item = (JsonObject) selectedItem.get(i);
- stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(item, true);
+ stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(item, false);
}
if (row % 4 == 0 && row > 1) {