Routing pipe - Paril/exppipes GitHub Wiki
Routing pipe
A pipe that routes items.
It will send any item passing through it to the shortest path to its destination, or to the highest priority route if it has been set. If the destination has been destroyed, the stack will be automatically re-routed.
Lookup order for destinations:
- the destination set in the traveling stack (relevant variable:
destination
inpipenetwork.ItemDirection
) - a pipe requesting the stack, highest priority request first
- a pipe who's filters match the item
- the default route, if set
- a random direction
Any pipe crafted from a routing pipe is itself a routing pipe, with extra functionality.
When a stack reaches its destination, it is inserted in a random inventory connected to the pipe. if the item cannot be inserted, it is sent back to the network.
OpenComputers integration
Component name: routingPipe
Note: For technical reasons, the "computer" filters and configuration are isolated from the "player" one.
Methods:
hasNetwork():boolean
:true
when the pipe is connected to a network,false
otherwisegetSinkConfig():...
: Returns the sink configuration. Usage:sink = {getSinkConfig()}
- Sink configuration entry fields:
string:item
: the registry name for the configured itemstring:filterType
: the filter typenumber:priority
: the entry priority
- Sink configuration entry fields:
addSinkFilter(string:item, [string:filterType=\"D\", [boolean:blacklist=false, [integer:meta=0, [string:nbtString=\"\"]]]]):integer
: Add a sink filter, returns filter ID.removeSinkFilter(integer:id)
: Removes a sink filter using its ID.clearSinkConfig()
: Completely clear the sink configuration.