@@ -114,6 +114,11 @@ public interface ICraftingPatternContainer {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlock the container so it may be used by processing pattern
|
||||
*/
|
||||
void unlock();
|
||||
|
||||
/**
|
||||
* Called when this container is used by a processing pattern to insert items or fluids in the connected inventory.
|
||||
*/
|
||||
|
@@ -969,6 +969,11 @@ public class CraftingTask implements ICraftingTask {
|
||||
|
||||
@Override
|
||||
public void onCancelled() {
|
||||
crafts.values().forEach(c -> {
|
||||
if (c instanceof Processing) {
|
||||
network.getCraftingManager().getAllContainer(c.getPattern()).forEach(ICraftingPatternContainer::unlock);
|
||||
}
|
||||
});
|
||||
for (ItemStack remainder : internalStorage.getStacks()) {
|
||||
network.insertItem(remainder, remainder.getCount(), Action.PERFORM);
|
||||
}
|
||||
|
@@ -429,6 +429,11 @@ public class CrafterNetworkNode extends NetworkNode implements ICraftingPatternC
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unlock() {
|
||||
locked = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsedForProcessing() {
|
||||
Optional<ICraftingPatternContainer> root = getRootContainerNotSelf();
|
||||
|
Reference in New Issue
Block a user