Fix concurrent modification exception (#92)

This commit is contained in:
Max Shen authored and GitHub committed 2026-05-03 20:43:05 -04:00
1 parent ad16588e3b
commit f27b66c53f
1 file changed
+2 -1
@@ -54,7 +54,8 @@ public class Lumbermill {
private static Collection<ItemStack> getRecipeResult(ItemStack output) {
List<ItemStack> list = new ArrayList<>();
for (IRecipe iRecipe : CraftingManager.getInstance().getRecipeList()) {
List<IRecipe> iRecipes = new ArrayList<>(CraftingManager.getInstance().getRecipeList());
for (IRecipe iRecipe : iRecipes) {
if (iRecipe instanceof ShapelessRecipes shapeless) {
if (shapeless.recipeItems.size() != 1 || !(shapeless.recipeItems.get(0) instanceof ItemStack)) {
continue;