Jump to content

Redstone IO: Difference between revisions

From Advanced Computers Wiki
Created page with "alt=Redstone IO block|thumb|Redstone IO block The Redstone IO block provides support for reading and setting redstone signals. It even supports specifying signal levels. == Provided component == This block provides the <code>itemInterface</code> component, offering methods shown below. For information on the side argument, see API:Sides. {| class="wikitable" |+ ItemInterfaceUD component methods |- ! Name !! Type !! Description |- | style=..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
== Provided component ==
== Provided component ==
This block provides the <code>itemInterface</code> component, offering methods shown below. For information on the side argument, see [[API:Sides]].
This block provides the <code>itemInterface</code> component, offering methods shown below. For information on the side argument, see [[API:Sides]].
{| class="wikitable"
|+RedstoneIoUD component properties
!Name
!Type
!Read/Write
!Description
|-
|<code>uniqueId</code>
|<code>integer</code>
|READ
|A unique numeric ID tied to this peripheral device, generated on block placement and persistent across restarts.
|}
{| class="wikitable"
{| class="wikitable"
|+ ItemInterfaceUD component methods
|+ RedstoneIoUD component methods
|-
|-
! Name !! Type !! Description
! Name !! Type !! Description
Line 11: Line 25:


|-
|-
| style="white-space: nowrap;" | <code><nowiki>:setInput(side:integer, level:integer|boolean)</nowiki></code>|| <code>void</code>|| Sets the redstone signal outputted by the redstone io block on the given side. A value of true/false is interpreted as 15 and 0 respectively.
| style="white-space: nowrap;" | <code><nowiki>:setOutput(side:integer, level:integer|boolean)</nowiki></code>|| <code>void</code>|| Sets the redstone signal outputted by the redstone io block on the given side. A value of true/false is interpreted as 15 and 0 respectively.
|}
|}


{{Navbox content}}
{{Navbox content}}

Latest revision as of 02:11, 7 September 2026

Redstone IO block
Redstone IO block

The Redstone IO block provides support for reading and setting redstone signals. It even supports specifying signal levels.

Provided component

This block provides the itemInterface component, offering methods shown below. For information on the side argument, see API:Sides.

RedstoneIoUD component properties
Name Type Read/Write Description
uniqueId integer READ A unique numeric ID tied to this peripheral device, generated on block placement and persistent across restarts.
RedstoneIoUD component methods
Name Type Description
:getInput(side:integer) integer Returns the current signal strength that is supplied to the redstone io block on the given side.
:setOutput(side:integer, level:integer|boolean) void Sets the redstone signal outputted by the redstone io block on the given side. A value of true/false is interpreted as 15 and 0 respectively.