@@ -114,6 +114,11 @@ public interface ICraftingPatternContainer {
|
|||||||
return false;
|
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.
|
* 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
|
@Override
|
||||||
public void onCancelled() {
|
public void onCancelled() {
|
||||||
|
crafts.values().forEach(c -> {
|
||||||
|
if (c instanceof Processing) {
|
||||||
|
network.getCraftingManager().getAllContainer(c.getPattern()).forEach(ICraftingPatternContainer::unlock);
|
||||||
|
}
|
||||||
|
});
|
||||||
for (ItemStack remainder : internalStorage.getStacks()) {
|
for (ItemStack remainder : internalStorage.getStacks()) {
|
||||||
network.insertItem(remainder, remainder.getCount(), Action.PERFORM);
|
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
|
@Override
|
||||||
public void onUsedForProcessing() {
|
public void onUsedForProcessing() {
|
||||||
Optional<ICraftingPatternContainer> root = getRootContainerNotSelf();
|
Optional<ICraftingPatternContainer> root = getRootContainerNotSelf();
|
||||||
|
Reference in New Issue
Block a user