Component API

The component API is used to access and interact with components available to a computer. Also see the page on component interaction.

snippet.lua
local component = require("component")
local rs0 = component.getPrimary("redstone")
local rs1 = component.redstone -- syntactic sugar
print(rs0 == rs1) -- true

Contents