Tube


Tubes can transport items from one place to another place.

Contents
  1. Recipes
  2. Usage
  3. Data
  4. History

Recipes

Recipe TypeIngredientsOutputExample
Shaped Crafting
  • 2x Tube

Shaped Crafting Recipe for Tubes (From Copper Ingots)

Shaped Crafting
  • 8x Tube

Shaped Crafting Recipe for Tubes (From Gold Ingots)

Usage

When tube blocks are placed adjacently, they connect to each other. Tubes will also form connections to item-handling blocks, such as hoppers and chests.

Tube blocks connecting a hopper to a chest

If this tube network is connected to at least one non-tube block which items can be inserted into (such as a chest), then items can be inserted into the tube via hoppers or similar blocks. These items will then be automatically routed to the nearest inventory which can accept the block.

If no inventories are available (or all inventories are full), items cannot be inserted into tubes. If an inventory becomes full while an item is en-route to that inventory, the item will attempt to reroute itself to the next-nearest inventory once it reaches the closed inventory; if there are no more remaining open inventories, the item is ejected into the world. A Shunt always accepts items, and can be useful for handling "overflow" items.

Items in tubes have a travel duration of 10 ticks per block (or a travel speed of two blocks per second). There is a "soft cap" of 400 connected tube blocks in a single network, above which this travel rate begins to slow down, and a "hard cap" of 500 connected tube blocks, above which tubes cease connecting to each other. These values can be set in the Server Config.

Pliers can be used to connect two non-adjacent tubes together; these tubes count as being one block apart for routing and travel duration.

Tubes can also be waterlogged.

Data

Blockstate PropertiesValuesDescription
down{"false", "true"}Whether the tube is connected to the block below it
up{"false", "true"}Whether the tube is connected to the block above it
north{"false", "true"}Whether the tube is connected to the north
south{"false", "true"}Whether the tube is connected to the south
west{"false", "true"}Whether the tube is connected to the west
east{"false", "true"}Whether the tube is connected to the east
waterlogged{"false", "true"}Whether the tube is waterlogged
transform{"identity", "rot_180_face_xz", "rot_90_y_neg", "rot_80_y_pos", "invert_x", "invert_z", "swap_xz", "swap_neg_xz"}Set when the block is rotated/mirrored by structure generation or similar mechanics; it ensures blockentity data is transformed accordingly. When placed by a player, this will always be "identity"
BlockEntity DataFormatDescription
connections
  • List of block positions in [X,Y,Z] format
  • e.g. [[2, 5, -6], [2, 5, -9]]
Relative distances to other blocks which this tube is connected to
inventory
[
	{
		"item": {}, // itemstack object
		"moves": [], // move list
		"ticks_remaining": integer,
		"max_duration": integer,
		"fresh": boolean
	}
]

List of the items currently travelling through the tube:

  • item is an itemstack object in standard vanilla format (with sub-fields id, count, components)
  • moves is the item's remaining moves encoded as a list of pairs of numbers [dir0, count0, dir1, count1, etc] where dirN, countN indicates count moves in the dir direction, where dirN is a direction ordinal in DUNSWE order
    • e.g. [0, 5, 4, 2] indicates DOWN 5 blocks followed by WEST 2 blocks
  • ticks_remaining is the number of ticks remaining in this tube before it moves to the next tube
  • max_duration is the total number of ticks the item spends in the tube
  • fresh indicates the tube is the tube which the item was originally inserted into (as opposed to a tube the item travelled to from another tube)

History

VersionChangelog
1.21.3-7.0.0.0Added to More Red