Skip to content

Commit

Permalink
fixed a cme when canceled crafts are removed
Browse files Browse the repository at this point in the history
closes #228
  • Loading branch information
Ellpeck committed Dec 3, 2024
1 parent af33933 commit 8d1bd8f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ public ItemStack store(ItemStack module, PipeBlockEntity tile, ItemStack stack,
var contents = module.get(Contents.TYPE);
var equalityTypes = ItemFilter.getEqualityTypes(tile);
var allCrafts = tile.getActiveCrafts();
var ourCrafts = allCrafts.stream().filter(c -> c.moduleSlot == slot && !c.getTravelingIngredient(stack, equalityTypes).isEmpty()).iterator();
while (ourCrafts.hasNext()) {
var craft = ourCrafts.next();
for (var craft : allCrafts.stream().filter(c -> c.moduleSlot == slot && !c.getTravelingIngredient(stack, equalityTypes).isEmpty()).toList()) {
craft.travelingIngredients.remove(craft.getTravelingIngredient(stack, equalityTypes));

if (contents.insertSingles) {
Expand Down

0 comments on commit 8d1bd8f

Please sign in to comment.