mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 15:39:22 +01:00
fixed network locks not being resolved when canceling crafting requests
This commit is contained in:
parent
b6df64df57
commit
636f40eee5
2 changed files with 6 additions and 4 deletions
|
@ -55,10 +55,10 @@ public class RetrievalModuleItem extends ModuleItem {
|
|||
Pair<BlockPos, ItemStack> dest = tile.getAvailableDestination(copy, true, this.preventOversending);
|
||||
if (dest == null)
|
||||
continue;
|
||||
// are we already waiting for crafting results? If so, don't request more
|
||||
if (network.getCurrentlyCraftingAmount(tile.getPos(), copy, equalityTypes) >= this.maxExtraction)
|
||||
break;
|
||||
if (network.requestItem(tile.getPos(), dest.getLeft(), dest.getRight(), equalityTypes).isEmpty())
|
||||
ItemStack remain = dest.getRight().copy();
|
||||
// are we already waiting for crafting results? If so, don't request those again
|
||||
remain.shrink(network.getCurrentlyCraftingAmount(tile.getPos(), copy, equalityTypes));
|
||||
if (network.requestItem(tile.getPos(), dest.getLeft(), remain, equalityTypes).isEmpty())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,6 +208,8 @@ public class ItemTerminalTileEntity extends TileEntity implements INamedContaine
|
|||
for (Pair<BlockPos, ItemStack> craftable : network.getAllCraftables(pipe.getPos())) {
|
||||
PipeTileEntity otherPipe = network.getPipe(craftable.getLeft());
|
||||
if (otherPipe != null) {
|
||||
for (NetworkLock lock : otherPipe.craftIngredientRequests)
|
||||
network.resolveNetworkLock(lock);
|
||||
otherPipe.craftIngredientRequests.clear();
|
||||
otherPipe.craftResultRequests.clear();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue