Skip to content

Network Repeater

The Network Repeater block
Network Repeater. Asset render of the block model, not an in-game screenshot.

The repeater connects things. A device can never link straight to the computer: it links to a repeater, and the repeater links to the computer or to another repeater. Chain repeaters to reach farther.

2 × Network Repeater

Shaped crafting table recipe. Progression: early automation. Ingredients: 4 × Iron Ingot, 4 × Copper Ingot, 1 × Redstone. It appears in the recipe book once you pick up one of its ingredients.

One recipe makes two repeaters.

Place it within 32 blocks of the computer or of another relay, and link them with the Linking Tool. Then link devices to it. A repeater accepts up to 16 links. Its ports look the same on every side, so its direction does not matter.

Its form shows its name, network status and how many of its links are connected. You can name it, though programs rarely need to.

A repeater cannot run a program.

repeaters.named(alias)

Refer to a Network Repeater by its name. Use it in a constant, then handle its events with on NAME.event(...).

Parameters: alias: string. Gives: Repeater. Cost: 4 operations.

const hub = repeaters.named("hub")

repeaters.from(alias)

Resolve a network repeater by name.

Parameters: alias: string. Gives: Repeater, or an error. Errors: device.type, device.unavailable, device.unknown, host.denied. Capability: devices.read. Cost: 16 operations.

router, err = repeaters.from("router")

Properties: hub.connected, hub.id, hub.kind, hub.name. They are read-only.

List directly linked devices with name, id, kind, capabilities and connected.

Gives: list, or an error. Errors: device.type, device.unavailable, device.unknown, host.denied. Capability: devices.read. Cost: 16 operations.

linked, err = router.links()

hub.status()

Summarize links: total, connected and the computer's network ID.

Gives: dict, or an error. Errors: device.type, device.unavailable, device.unknown, host.denied. Capability: devices.read. Cost: 16 operations.

info, err = router.status()
EventWhen it runs
connectedRuns when the device becomes reachable, for example after its area loads.
disconnectedRuns when the device stops being reachable: unloaded, unlinked or removed.
const hub = repeaters.named("hub")
on hub.disconnected {
print("The hub lost its connection. Is its area loaded?")
}