mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 19:58:35 +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,14 +143,12 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
|
||||||
return false;
|
return false;
|
||||||
this.startProfile("find_destination");
|
this.startProfile("find_destination");
|
||||||
for (BlockPos pipePos : this.getOrderedNetworkNodes(startPipePos)) {
|
for (BlockPos pipePos : this.getOrderedNetworkNodes(startPipePos)) {
|
||||||
if (pipePos.equals(startPipePos))
|
|
||||||
continue;
|
|
||||||
PipeTileEntity pipe = this.getPipe(pipePos);
|
PipeTileEntity pipe = this.getPipe(pipePos);
|
||||||
BlockPos dest = pipe.getAvailableDestination(stack, false, preventOversending);
|
BlockPos dest = pipe.getAvailableDestination(stack, false, preventOversending);
|
||||||
if (dest != null) {
|
if (dest == null || dest.equals(startInventory))
|
||||||
this.endProfile();
|
continue;
|
||||||
return this.routeItemToLocation(startPipePos, startInventory, pipe.getPos(), dest, itemSupplier);
|
this.endProfile();
|
||||||
}
|
return this.routeItemToLocation(startPipePos, startInventory, pipe.getPos(), dest, itemSupplier);
|
||||||
}
|
}
|
||||||
this.endProfile();
|
this.endProfile();
|
||||||
return false;
|
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) {
|
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;
|
return stack;
|
||||||
ItemStack remain = stack.copy();
|
ItemStack remain = stack.copy();
|
||||||
for (int slot : location.getStackSlots(this.world, stack, equalityTypes)) {
|
for (int slot : location.getStackSlots(this.world, stack, equalityTypes)) {
|
||||||
|
|
Loading…
Reference in a new issue