Skip to main content

Cables and pipes

A transport is a cable, pipe or tube: a block that joins its neighbors of the same kind into a network, and moves resources between the machines it touches.

  • A network takes from the machines' output ports and fills their input ports.
  • Each transport type carries one kind of resource (energy, fluids, items…) at a rate per tick.
  • Networks are rebuilt from the loaded blocks; a transport keeps no data of its own.
  • Networks never load chunks and never catch up while unloaded.

Transport types are registered by addons, in Java (Mekanized's universal cables, mechanical pipes…). MachineEngine itself registers none, and they cannot be defined in YAML. What you configure is the block.

The transport block​

blocks:
mypack:copper_cable:
template: machineengine:block/transport # the transport of the same id, drops itself
behavior:
rate: 8000
connection_items: mypack:cable_part/copper

Or without the template:

behavior:
type: machineengine:transport
transport: mypack:copper_cable
KeyDefaultMeaning
transport—Required. The transport type (from an addon).
ratethe type'sPer tick, replacing the transport type's: tiers of one type.
connection_itemsnoneDraws the cable with items, below.

Drawing the cable​

With connection_items: <prefix>, the block shows a center piece and an arm toward each connected side, as display entities. The block itself keeps one state, however the cable connects. Four items:

ItemShown
<prefix>/centerAlways.
<prefix>/armToward each connected side. Its model points north; MachineEngine turns it.
<prefix>/arm_pullToward a side in pull mode.
<prefix>/arm_pushToward a side in push mode.

Solar generators, energy cubes and a machine joined by universal cables

Generators, energy cubes and a machine joined by cables: each cable draws an arm toward what it connects to.

A side is connected when the neighbor is a transport of the same network, or a machine port that carries what the transport does. A prefix without arm items may instead name one item per side, <prefix>/<direction> (with _pull and _push variants).

Side modes​

Each side of a transport has a mode:

ModeToward a machineToward a container (chest…)
defaultTakes from its outputs, fills its inputsOnly fills it
pullOnly takes from itTakes from it
pushOnly fills itFills it
noneNot connectedNot connected

Modes are changed with an addon's tool (Mekanized's configurator cycles them). MachineEngine's own machineengine:wrench rotates and dismantles machines; it does not change side modes.

Checking a network​

  • /machineengine network while looking at a cable: its network, members and rate.
  • /machineengine debug: dots in each network's color, with sparks while it moves resources.