Prevent ConcurrentModificationException while searching for fuels in ItemList (#926)

This commit is contained in:
slprime authored and GitHub committed 2026-05-06 19:43:50 +03:00
1 parent ccbf94790a
commit d5f25a4be8
2 files changed
+7 -4

No files matched your search

+3 -1
View File
@@ -251,7 +251,6 @@ public class ItemList {
private void updateOrdering(List<ItemStack> items) {
final Map<ItemStack, Integer> newOrdering = new HashMap<>();
ItemSorter.sort(items);
if (!CollapsibleItems.isEmpty()) {
final HashMap<Integer, Integer> groups = new HashMap<>();
@@ -424,6 +423,9 @@ public class ItemList {
}
}
if (interrupted()) return;
ItemSorter.sort(items);
if (interrupted()) return;
ItemList.items = items;
ItemList.itemMap = itemMap;