Fixed internal crafting inventory not being returned when Controller is broken. Fixes #2396
This commit is contained in:
@@ -974,6 +974,7 @@ public class CraftingTask implements ICraftingTask {
|
||||
network.getCraftingManager().getAllContainer(c.getPattern()).forEach(ICraftingPatternContainer::unlock);
|
||||
}
|
||||
});
|
||||
|
||||
for (ItemStack remainder : internalStorage.getStacks()) {
|
||||
network.insertItem(remainder, remainder.getCount(), Action.PERFORM);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.refinedmods.refinedstorage.apiimpl.network;
|
||||
|
||||
import com.refinedmods.refinedstorage.RS;
|
||||
import com.refinedmods.refinedstorage.api.autocrafting.ICraftingManager;
|
||||
import com.refinedmods.refinedstorage.api.autocrafting.task.ICraftingTask;
|
||||
import com.refinedmods.refinedstorage.api.network.INetwork;
|
||||
import com.refinedmods.refinedstorage.api.network.INetworkNodeGraph;
|
||||
import com.refinedmods.refinedstorage.api.network.NetworkType;
|
||||
@@ -203,6 +204,10 @@ public class Network implements INetwork, IRedstoneConfigurable {
|
||||
|
||||
@Override
|
||||
public void onRemoved() {
|
||||
for (ICraftingTask task : craftingManager.getTasks()) {
|
||||
task.onCancelled();
|
||||
}
|
||||
|
||||
nodeGraph.disconnectAll();
|
||||
}
|
||||
|
||||
@@ -323,7 +328,6 @@ public class Network implements INetwork, IRedstoneConfigurable {
|
||||
return newStack;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Nonnull
|
||||
public FluidStack insertFluid(@Nonnull FluidStack stack, int size, Action action) {
|
||||
|
||||
Reference in New Issue
Block a user