mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-26 05:28:33 +01:00
fixed single-pipe networks not allowing items through
This commit is contained in:
parent
def337be85
commit
9d29ed53c0
1 changed files with 5 additions and 7 deletions
|
@ -143,15 +143,13 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
|
|||
return false;
|
||||
this.startProfile("find_destination");
|
||||
for (BlockPos pipePos : this.getOrderedNetworkNodes(startPipePos)) {
|
||||
if (pipePos.equals(startPipePos))
|
||||
continue;
|
||||
PipeTileEntity pipe = this.getPipe(pipePos);
|
||||
BlockPos dest = pipe.getAvailableDestination(stack, false, preventOversending);
|
||||
if (dest != null) {
|
||||
if (dest == null || dest.equals(startInventory))
|
||||
continue;
|
||||
this.endProfile();
|
||||
return this.routeItemToLocation(startPipePos, startInventory, pipe.getPos(), dest, itemSupplier);
|
||||
}
|
||||
}
|
||||
this.endProfile();
|
||||
return false;
|
||||
}
|
||||
|
@ -191,7 +189,7 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
|
|||
}
|
||||
|
||||
public ItemStack requestItem(NetworkLocation location, BlockPos destPipe, BlockPos destInventory, ItemStack stack, ItemEqualityType... equalityTypes) {
|
||||
if (location.pipePos.equals(destPipe))
|
||||
if (location.getPos().equals(destInventory))
|
||||
return stack;
|
||||
ItemStack remain = stack.copy();
|
||||
for (int slot : location.getStackSlots(this.world, stack, equalityTypes)) {
|
||||
|
|
Loading…
Reference in a new issue