fixed extraneous crafts causing a kick

closes #233
This commit is contained in:
Ell 2024-12-04 22:22:37 +01:00
parent 652b3538d2
commit 4212b45e7a

View file

@ -333,6 +333,8 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
for (var craft : pipe.getActiveCrafts()) { for (var craft : pipe.getActiveCrafts()) {
if (!includeCanceled && craft.canceled) if (!includeCanceled && craft.canceled)
continue; continue;
if (craft.resultStackRemain.isEmpty())
continue;
// add up all the items that should go to the same location // add up all the items that should go to the same location
var existing = items.stream() var existing = items.stream()
.filter(s -> s.getLeft().equals(craft.resultDestPipe) && ItemEquality.compareItems(s.getRight(), craft.resultStackRemain, equalityTypes)) .filter(s -> s.getLeft().equals(craft.resultDestPipe) && ItemEquality.compareItems(s.getRight(), craft.resultStackRemain, equalityTypes))