Stop when matched
This commit is contained in:
@@ -350,7 +350,9 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
|
||||
for (ICraftingTask task : craftingTasks) {
|
||||
if (task instanceof ProcessingCraftingTask) {
|
||||
((ProcessingCraftingTask) task).onInserted(stack);
|
||||
if (((ProcessingCraftingTask) task).onInserted(stack)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,12 +58,15 @@ public class ProcessingCraftingTask implements ICraftingTask {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onInserted(ItemStack inserted) {
|
||||
public boolean onInserted(ItemStack inserted) {
|
||||
for (int i = 0; i < pattern.getOutputs().length; ++i) {
|
||||
if (!satisfied[i] && InventoryUtils.compareStack(inserted, pattern.getOutputs()[i])) {
|
||||
satisfied[i] = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user