aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-01-30 18:22:49 +0800
committerBuildTools <james.jenour@protonmail.com>2021-01-30 18:22:49 +0800
commit3290259e39e9816fd92afa85710de01a6ddfa3b9 (patch)
treee105bcfccfbc38f091848a94667dd612271eed7c /src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
parent659a0e4981640802058d9eef35fec16fab82c5f2 (diff)
downloadnotenoughupdates-3290259e39e9816fd92afa85710de01a6ddfa3b9.tar.gz
notenoughupdates-3290259e39e9816fd92afa85710de01a6ddfa3b9.tar.bz2
notenoughupdates-3290259e39e9816fd92afa85710de01a6ddfa3b9.zip
PRE13.2
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index cd81da0b..592ed628 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -1227,19 +1227,22 @@ public class NEUOverlay extends Gui {
this.searchedItems = searchedItems;
this.searchedItemsSubgroup = searchedItemsSubgroup;
- searchedItemsArr = null;
+ this.searchedItemsArr = null;
+
redrawItems = true;
});
}
/**
* Returns an index-able array containing the elements in searchedItems.
- * Whenever searchedItems is updated via the above method, the array is recreated here.
+ * Whenever searchedItems is updated in updateSearch(), the array is recreated here.
*/
public JsonObject[] getSearchedItems() {
- if(searchedItems==null) {
+ if(searchedItems == null) {
updateSearch();
+ return new JsonObject[0];
}
+
if(searchedItemsArr==null) {
searchedItemsArr = new JsonObject[searchedItems.size()];
int i=0;