This component represents a Carriage Controller block from the Redstone in Motion mod.
Important: this component is only available if OpenComponents is also installed!
Contents of OpenComponents have already been added into OpenComputers.
Component name: carriage
.
Callbacks:
getAnchored(): boolean
setAnchored(value: boolean): boolean
move(direction: string or number[, simulate: boolean]): boolean
true
if the command was relayed successfully.carriage_moved
. It has the signature success: result[, reason: string]
, where reason
is an error string if the move failed. This is because the computer that triggers the move may be moved as well, meaning it has to be persisted, which is only possible while it is in a yielded state.simulate(direction: string or number): boolean
move(direction, true)
. Example use:
local component = require("component") local event = require("event") local sides = require("sides") local cc = component.carriage -- get primary carriage controller cc.move("up") local _, _, result, reason, x, y, z = event.pull("carriage_moved") if not result then if x then print(reason) print("Block location: " .. x .. ", " .. y .. ", " .. z) else print(reason) end end -- using the sides table: cc.simulate(sides.west)
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 |