Stop running the LoadItem task on every inventory open (which also re-ran the search and caused lag on every inventory open).

Unclear if this breaks anything -- it works with simple testing.
This commit is contained in:
Jason Mitchell committed 2020-01-08 21:32:53 -08:00
1 parent 64ad0f826e
commit bc1aa9e97e
4 files changed
+11 -2

No files matched your search

+5 -1
View File
@@ -100,6 +100,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public static HashMap<Integer, LayoutStyle> layoutStyles = new HashMap<>();
public static boolean ftbUtilsLoaded = false;
public static boolean itemsLoaded = false;
public static void load() {
ftbUtilsLoaded = Loader.isModLoaded("FTBU");
@@ -559,7 +560,10 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
if (isEnabled()) {
setInputFocused(null);
ItemList.loadItems.restart();
if(!itemsLoaded) {
ItemList.loadItems.restart();
itemsLoaded = true;
}
overlayRenderer = null;
getLayoutStyle().init();