Skip to content

RedRouter Block

Image title This peripheral is provided by the RedRouter Block. It is used to control redstone signals.

The peripheral acts similar to the Redstone API with some exceptions like missing bundled cable support.
The sides are configured similarly to the turtle, where "left" is relative to the blocks facing.

Metadata

Peripheral v1
Attach name "redrouter"
Attach side all

Events

The RedRouter can send the following event:

Name Description Parameter 1
"redstone" Whenever a redstone signal has changed. string: attached_name

Functions

setOutput(side, on)

Set a redstone signal for a specific side.

Parameters

  1. side : string The side to set.
  2. on: boolean The signals state true (power 15) or false (power 0)

setAnalogOutput(side, value)

Set a redstone signal strength for a specific side.

Parameters

  1. side : string The side to set.
  2. value : number The signal strength between 0 and 15.

Throws

  • Whenever value is not between 0 and 15.

getOutput(side)

Get the current redstone output of a specific side. (see setOutput)

Parameters

  1. side: string The side to get.

Returns

  1. boolean Whether the redstone output is on or off.

getInput(side)

Get the current redstone input of a specific side.

Parameters

  1. side: string The side to get.

Returns

  1. boolean Whether the redstone input is on or off.

getAnalogOutput(side)

Get the redstone output signal strength for a specific side. (see setAnalogOutput)

Parameters

  1. side: string The side to get.

Returns

  1. number The output signal strength, between 0 and 15.

getAnalogInput(side)

Get the redstone input signal strength for a specific side.

Parameters

  1. side: string The side to get.

Returns

  1. number The input signal strength, between 0 and 15.