mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 23:39:22 +01:00
fixed a crash with trying to find a path to a nonexistant pipe
This commit is contained in:
parent
10645ac54d
commit
4368f2945b
1 changed files with 2 additions and 2 deletions
|
@ -136,9 +136,9 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
|
|||
}
|
||||
|
||||
public boolean routeItemToLocation(BlockPos startPipePos, BlockPos startInventory, BlockPos destPipe, BlockPos destInventory, Function<Float, PipeItem> itemSupplier) {
|
||||
if (!this.isNode(startPipePos))
|
||||
if (!this.isNode(startPipePos) || !this.isNode(destPipe))
|
||||
return false;
|
||||
if (!this.world.isBlockLoaded(startPipePos))
|
||||
if (!this.world.isBlockLoaded(startPipePos) || !this.world.isBlockLoaded(destPipe))
|
||||
return false;
|
||||
PipeTileEntity startPipe = this.getPipe(startPipePos);
|
||||
if (startPipe == null)
|
||||
|
|
Loading…
Reference in a new issue