forEachConnectedNode

inline suspend fun forEachConnectedNode(node: NetworkNode, action: (NetworkType<*>, BlockFace, NetworkNode) -> Unit)

Iterates over all NetworkNodes connected to node, calling action for each connection. The action parameters describe using which NetworkType and through wich BlockFace the NetworkNode is connected. Some NetworkNodes may be connected through multiple NetworkTypes.

Throws

If there is no data for node.


inline suspend fun forEachConnectedNode(node: NetworkNode, networkType: NetworkType<*>, action: (BlockFace, NetworkNode) -> Unit)

Iterates over all NetworkNodes connected to node using networkType, calling action for each connection. The action parameters describe through wich BlockFace the NetworkNode is connected.

Throws

If there is no data for node.