Skip to content
Joachim Stolberg edited this page Jan 26, 2019 · 55 revisions

Tubelib: Basic Blocks for Item Transport

Tubelib Pusher

The Pusher is a pulling/pushing block, moving items from one inventory block to another (e.g. chests). The standard Pusher moves one item every 2 seconds. The fast Pusher moves one item every second.

The simplest arrangement with a Pusher is:

Start the Pusher with a right-click. It shows the state 'running' as infotext. The Pusher moves items from left to right (IN to OUT). If the source chest is empty, the Pusher goes into 'standby' state for some seconds. If the destination chest is full, the Pusher goes into 'blocked' state. All states can be read by means of the SmartLine and SaferLua Controllers (see following tables)

Tubelib Pusher Tubelib Pusher tubelib:pusher
States: "running", "stopped", "standby", "blocked", "defect"
Features: -

Supported Commands:

  • "control": turn the device/block "on" or "off"
    • via SmartLine Controller: switch
    • via SaferLua Controller: $send_cmnd(num, text)
  • "state": read the state of the block
    • via SmartLine Controller: state
    • via SaferLua Controller: $get_status(num)
Fast Pusher Fast Pusher tubelib_addons1:pusher_fast
States: "running", "stopped", "standby", "blocked", "defect"
Features: -

Supported Commands:

  • "control": turn the device/block "on" or "off"
    • via SmartLine Controller: switch
    • via SaferLua Controller: $send_cmnd(num, text)
  • "state": read the state of the block
    • via SmartLine Controller: state
    • via SaferLua Controller: $get_status(num)

For larger distances Tubes are used.

Tubes allow the connection of two blocks. Tube forks are not possible. You have to use chests or other inventory blocks as hubs to build more complex structures. Tubes for itself are passive. But Tubes can be used in both direction at the same time. The maximum tube length is limited to 200 blocks.
"Straight ahead tubes" can be placed with the help of the "sneak" button.
This is required to pass through chests or other blocks without being contacted.

Tubelib Distributor

For sorting tasks Distributors are used.

The Distributor works as filter and pusher. It allows to divide and distribute incoming items into 4 tube channels. The channels can be switched on/off and individually configured with up to 6 items per channel. The filter passes the configured items and restrains all others.

Tubelib Distributor Tubelib Distributor tubelib:distributor
States: "running", "stopped", "standby", "blocked", "defect"
Features: -

Supported Commands:

  • "control": turn the device/block "on" or "off"
    • via SmartLine Controller: switch
    • via SaferLua Controller: $send_cmnd(num, text)
  • "state": read the state of the block
    • via SmartLine Controller: state
    • via SaferLua Controller: $get_status(num)
  • "filter": enable/disable one of the four filters ("red"/"green"/"blue"/"yellow")
    • via SmartLine Controller: set_filter
    • via SaferLua Controller: $set_filter(num, slot, val)
  • "counter": read the counter value of already processed items
    • via SaferLua Controller: $get_counter(num)
  • "clear": clear the item counter (set to 0)
    • via SaferLua Controller: $clear_counter(num)

Here 3 ports for red, blue and green wool are used. The color of the port correspond to the color of the output sides. Unused output sided (here green), top and bottom sides can be used as inputs.

To increase the throughput, one item can be added several times (blue wool) to a filter. But also different items can be used to configure one filter (yellow). Unconfigured but activated filters are used for items, which do not fit to all other filters. If the Distributor can’t push an item into a block with an inventory (such as a chest) because that inventory is full, but there is one open and unconfigured output, it will use this output port.

Tubelib Numbers

All Tubelib blocks, which can be controlled, obtain a unique number which is shown as node infotext. This number is used as destination address for commands and events.

Tubelib Button/Switch

The Button/Switch is a simple communication block to turn on/off other blocks by means of commands. To turn the Pusher on/off, the number (here 0407) has to be entered into the Button formspec. (Don't forget the leading zeros!)

This block can be configured as button or as switch. For the button configuration, times between 2 to 16 seconds are possible. You can control several blocks by means of one button. In this case all numbers with blanks in between have to be entered.

Tubelib Button/Switch Tubelib Button/Switch tubelib:button
States: -
Features: sends "on"/"off" events

Supported Commands: -

Tubelib Lamp

The Lamp can be turned on/off by means of the right-clicks or by means of messages commands from a Button/Switch or any other command sending block.

Tubelib Lamp Tubelib Lamp tubelib:lamp
States: -
Features: -

Supported Commands:

  • "control": turn the device/block "on" or "off"
    • via SmartLine Controller: switch
    • via SaferLua Controller: $send_cmnd(num, text)

Tubelib Forceload Block

The Forceload Block keeps the corresponding area loaded and the machines operational as far as the player is logged in. If the player leaves the game, all areas will be unloaded. The maximum number of Forceload Blocks per player is configurable (default 12).

Tubelib Forceload Block Tubelib Forceload Block tubelib:forceload
States: -
Features: -

Supported Commands: -

The loaded area per block is a cube with 16 m side length (according to a Minetest block). Punching the block makes the area visible and invisible again.

Tubelib Black Hole

The Tubelib Black Hole Block let items disappear. If your machine produces to much or unneeded items, push them into the Black Hole.

Tubelib Black Hole Tubelib Black Hole tubelib:blackhole
States: number of disappeared items
Features: -

Supported Commands:

  • "state": read the state of the block
    • via SmartLine Controller: state
    • via SaferLua Controller: $get_status(num)

Tubelib Repair Kit

This tool is used to repair defect machines.

Tubelib Repair Kit Tubelib Repair Kit tubelib:repairkit
States: -
Features: -

Supported Commands: -

Tubelib End Wrench

Each machine supporting the "defect" state can now be set to "defect" by means of the Tubelib End Wrench (for Controller program testing purposes).

  • left-click (use) read machine state information
  • right-click (place) set aging counter to 999999. Machine goes defect with the next operating cycle.
Tubelib End Wrench Tubelib End Wrench tubelib:end_wrench
States: -
Features: -

Supported Commands: -

Clone this wiki locally