check if items can be inserted in to machine before starting a CraftingStepProcess
This commit is contained in:
@@ -291,9 +291,15 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
for (ICraftingStep otherProcessable : otherTask.getSteps()) {
|
for (ICraftingStep otherProcessable : otherTask.getSteps()) {
|
||||||
if (otherProcessable.getPattern().isProcessing()) {
|
if (otherProcessable.getPattern().isProcessing()) {
|
||||||
if (otherProcessable != processable && !otherProcessable.hasReceivedOutputs() && otherProcessable.hasStartedProcessing() && otherProcessable.getPattern().getContainer().getFacingTile() != null) {
|
if (otherProcessable != processable && !otherProcessable.hasReceivedOutputs() && otherProcessable.hasStartedProcessing() && otherProcessable.getPattern().getContainer().getFacingTile() != null) {
|
||||||
if (!arePatternsEqual(processable.getPattern(), otherProcessable.getPattern())) {
|
|
||||||
if (processable.getPattern().getContainer().getFacingTile().getPos().equals(otherProcessable.getPattern().getContainer().getFacingTile().getPos())) {
|
if (processable.getPattern().getContainer().getFacingTile().getPos().equals(otherProcessable.getPattern().getContainer().getFacingTile().getPos())) {
|
||||||
|
if (!arePatternsEqual(processable.getPattern(), otherProcessable.getPattern())) {
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
for (ItemStack toInsert : processable.getToInsert()) {
|
||||||
|
if (ItemHandlerHelper.insertItem(processable.getPattern().getContainer().getFacingInventory(), toInsert, true) != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user