This component represents a Redstone card.
As of OC 1.3 there is a tier two redstone card. The tier one Redstone Card only supports vanilla redstone functionality (single-line analog redstone). Tier two provides interoperation with other mods' redstone systems (bundled, wireless). For bundled input/output the following mods are supported: RedLogic, Project Red (with Version 1.1), MineFactory Reloaded. For wireless redstone, the following mods are supported: WR-CBE, SlimeVoid's WR.
Component name: redstone
.
Callbacks:
getInput(side: number): number
sides.south
is in front of the computer, not south in the world. Likewise, sides.left
is to the left of the computer, so when you look at the computer's front, it'll be to your right.getOutput(side: number): number
setOutput(side: number, value: number): number
getBundledInput(side: number, color: number): number
getInput
, but for bundled input, reading the value for the channel with the specified API/Colors.getBundledOutput(side: number, color: number): number
getOutput
, but for bundled output, getting the value for the channel with the specified API/Colors.setBundledOutput(side: number, color: number, value: number): number
setOutput
, but for bundled output, setting the value for the channel with the specified API/Colors.getWirelessInput():number
getWirelessOutput():boolean
setWirelessOutput(value:boolean):boolean
getWirelessFrequency():number
setWirelessFrequency(frequency:number):number
Note that for mods such as ProjectRed, low values (such as the vanilla maximum of 15) may not function as expected for simple on/off values (opening a door for example), because they have a larger value range. You may need to use a higher value, such as 255.
Example use:
local component = require("component") local sides = require("sides") local colors = require("colors") local rs = component.redstone -- get primary redstone component print(rs.getInput(sides.back)) rs.setBundledOutput(sides.bottom, colors.green, rs.getBundledInput(sides.top, colors.red))
Components | 3D Printer - Abstract Bus - Access Point - Chunkloader - Computer - Crafting - Data Card - Database - Debug - Drone - Drive - EEPROM - Experience - Filesystem - Generator - Geolyzer - GPU - Hologram - Internet - Inventory Controller - Leash - Microcontroller - Modem - Motion Sensor - Navigation - Net Splitter - Piston - Redstone - Redstone in Motion - Robot - Screen - Sign - Tank Controller - Tractor Beam - Transposer - Tunnel - World Sensor | |
---|---|---|
Others | Component Access - Signals | |
Cross-Mod Integration | Applied Energistics |