Block reference

Material I/O

Material I/O is the inventory and fluid proxy block of XL Logic. It can inspect adjacent handlers per side and can move resources either inside the same block or directly into another named Material I/O endpoint.

Inventory + fluid endpoint Direct endpoint routing Complete
Back to block overview
In game

Mode and naming controls.

  • Right click opens endpoint naming.
  • Shift-right-click cycles the mode between items_only, fluids_only, and hybrid.
  • The state summary also reports whether item/fluid input and output are enabled.
Python commands

Inventory, tanks, and transfer operations.

  • get_mode() and set_mode("items_only" | "fluids_only" | "hybrid").
  • item_input_enabled(), set_item_input_enabled(enabled), item_output_enabled(), set_item_output_enabled(enabled).
  • fluid_input_enabled(), set_fluid_input_enabled(enabled), fluid_output_enabled(), set_fluid_output_enabled(enabled).
  • inventory_size(side), stack(side, slot), and inventory(side) for item inspection.
  • count_item(side, item_id) for fast item counting.
  • transfer_item(source_side, target_side, source_slot, amount) for local item movement.
  • transfer_item_to(target_api, source_side, target_side, source_slot, amount) for direct item routing to another named Material I/O.
  • tank_count(side), tank(side, tank_index), and tanks(side) for fluid inspection.
  • transfer_fluid(source_side, target_side, source_tank, amount) and transfer_fluid_to(target_api, source_side, target_side, source_tank, amount) for fluid movement.
  • side_aliases(), state(), and rename(name).
material_route.py
source = get_device("source_io")

if source is not None:
    screen.show("North inventory", {
        "slots": source.inventory_size("north"),
        "stacks": len(source.inventory("north")),
    })
    moved = source.transfer_item_to("sink_io", "south", "south", 0, 16)
    screen.show("Transfer", {"moved": moved})