Difference between revisions of "Redstone (API)"
From ComputerCraft Wiki
(Created page with "The redstone API contains the following functions for RedPower cables: * redstone.getBundledInput( side ) * redstone.testBundledInput( side, color ) * redstone.setBundledOutpu...") |
(Added a few more methods) |
||
Line 1: | Line 1: | ||
− | The redstone API contains | + | |
− | * | + | |
− | + | == Description == | |
− | + | ||
− | + | The redstone API contains methods to control attached RedPower cables/bundled cables | |
+ | |||
+ | == Methods == | ||
+ | |||
+ | {| border="1" cellpadding="2" cellspacing="0" | ||
+ | !style="background:#EEE" width="200px"|Method name | ||
+ | !style="background:#EEE" width="*"|Description | ||
+ | |- | ||
+ | |[[Redstone_getBundledInput(side)|getBundledInput]]( side ) | ||
+ | | | ||
+ | |- | ||
+ | |[[Redstone_getBundledOutput|getBundledOutput]]( side ) | ||
+ | |returns the state of a redpower wire inside a bundle connected to ''side'' | ||
+ | |- | ||
+ | |[[Redstone_setBundledOutput|setBundledOutput]]( side, colors ) | ||
+ | |Sets one or multiple colored signals in a redpower bundled wire connected to ''Side'' | ||
+ | |- | ||
+ | |[[Redstone_testBundledInput|testBundledInput]]( side, color ) | ||
+ | |Returns true or false whether or not a colored signal is active in a redpower bundled wire connected to ''Side'' | ||
+ | |- | ||
+ | |[[Redstone_getInput|getInput]]( side ) | ||
+ | |Returns the current redstone signal state on ''side'' | ||
+ | |- | ||
+ | |[[Redstone_getSides|getSides]]() | ||
+ | |Returns an array of possible sides | ||
+ | |- | ||
+ | |[[Redstone_setOutput|setOutput]]( side,boolean ) | ||
+ | |Set or reset a redstone signal on ''side'' | ||
+ | |} | ||
+ | |||
[[Category:APIs]] | [[Category:APIs]] |
Revision as of 12:21, 29 January 2012
Description
The redstone API contains methods to control attached RedPower cables/bundled cables
Methods
Method name | Description |
---|---|
getBundledInput( side ) | |
getBundledOutput( side ) | returns the state of a redpower wire inside a bundle connected to side |
setBundledOutput( side, colors ) | Sets one or multiple colored signals in a redpower bundled wire connected to Side |
testBundledInput( side, color ) | Returns true or false whether or not a colored signal is active in a redpower bundled wire connected to Side |
getInput( side ) | Returns the current redstone signal state on side |
getSides() | Returns an array of possible sides |
setOutput( side,boolean ) | Set or reset a redstone signal on side |