mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 12:20:00 +00:00
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:
1 parent
64ad0f826e
commit
bc1aa9e97e
4 files changed
+11
-2
No files matched your search
@@ -2,4 +2,4 @@ mc_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
ccl_version=1.1.3.138
|
||||
ccc_version=1.0.7.+
|
||||
mod_version=2.0.0-pre-12-GTNH
|
||||
mod_version=2.0.0-pre-13-GTNH
|
||||
@@ -182,6 +182,7 @@ public class ItemList
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
// System.out.println("Executing NEI Item Loading");
|
||||
ThreadOperationTimer timer = getTimer(500);
|
||||
|
||||
LinkedList<ItemStack> items = new LinkedList<>();
|
||||
@@ -243,6 +244,7 @@ public class ItemList
|
||||
{
|
||||
@Override
|
||||
public void execute() {
|
||||
// System.out.println("Executing NEI Item Filtering");
|
||||
ArrayList<ItemStack> filtered = new ArrayList<>();
|
||||
ItemFilter filter = getItemListFilter();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -518,12 +518,15 @@ public class SubsetWidget extends Button implements ItemFilterProvider, ItemsLoa
|
||||
}
|
||||
|
||||
public synchronized void reallocate() {
|
||||
// System.out.println("NEI Subset - Reallocate");
|
||||
// Thread.dumpStack();
|
||||
reallocate = true;
|
||||
restart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
// System.out.println("Executing NEI Subset Item Allocation");
|
||||
HashMap<String, SubsetState> state = new HashMap<>();
|
||||
List<SubsetTag> tags = new LinkedList<>();
|
||||
synchronized (root) {
|
||||
|
||||
Reference in new issue
Block a user