mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-26 05:28:33 +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) {
|
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;
|
return false;
|
||||||
if (!this.world.isBlockLoaded(startPipePos))
|
if (!this.world.isBlockLoaded(startPipePos) || !this.world.isBlockLoaded(destPipe))
|
||||||
return false;
|
return false;
|
||||||
PipeTileEntity startPipe = this.getPipe(startPipePos);
|
PipeTileEntity startPipe = this.getPipe(startPipePos);
|
||||||
if (startPipe == null)
|
if (startPipe == null)
|
||||||
|
|
Loading…
Reference in a new issue