This mod adds one type of pipe, which has extensive item routing functionality - "Smart Pipe".
You can change its item flow directions, set blacklists and whitelists. It is done via pipe UI.
You can easily see main flow direction from a given pipe side by holding "Ctrl", and from an opposite side by holding "Alt".
If you want to remove the items from the pipe without breaking it, then sneak and click it with empty hand.
Pipe side with a non-direct flow will have a yellow rectangle; pipe side with a whitelist will have a white rectangle, and pipe side with a blacklist will have a black rectangle.
Approximate item flow algorithm:
Requires Satako