mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 19:58:35 +01:00
fixed populating filters sometimes inserting more than one item into the filter
Closes #38
This commit is contained in:
parent
bb06cb34eb
commit
60dd405f5d
1 changed files with 4 additions and 4 deletions
|
@ -92,14 +92,14 @@ public class ItemFilter extends ItemStackHandler {
|
||||||
ItemStack copy = stack.copy();
|
ItemStack copy = stack.copy();
|
||||||
copy.setCount(1);
|
copy.setCount(1);
|
||||||
// try inserting into ourselves and any filter increase modifiers
|
// try inserting into ourselves and any filter increase modifiers
|
||||||
for (ItemStackHandler filter : filters) {
|
for (ItemFilter filter : filters) {
|
||||||
if (ItemHandlerHelper.insertItem(filter, copy, false).isEmpty())
|
if (ItemHandlerHelper.insertItem(filter, copy, false).isEmpty()) {
|
||||||
|
filter.save();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (ItemFilter filter : filters)
|
}
|
||||||
filter.save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue