RedRouter Block¶
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
setAnalogOutput(side, value)
¶
Set a redstone signal strength for a specific side.
Parameters
Throws
- Whenever
value
is not between 0 and 15.
getOutput(side)
¶
Get the current redstone output of a specific side. (see setOutput
)
Parameters
side
: string The side to get.
Returns
boolean
Whether the redstone output is on or off.
getInput(side)
¶
Get the current redstone input of a specific side.
Parameters
side
: string The side to get.
Returns
boolean
Whether the redstone input is on or off.
getAnalogOutput(side)
¶
Get the redstone output signal strength for a specific side. (see setAnalogOutput
)
Parameters
side
: string The side to get.
Returns
- number The output signal strength, between 0 and 15.
getAnalogInput(side)
¶
Get the redstone input signal strength for a specific side.
Parameters
side
: string The side to get.
Returns
- number The input signal strength, between 0 and 15.