Jump to content

Component

From Advanced Computers Wiki
Revision as of 23:19, 1 August 2026 by GHXX (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

All functionality in Advanced Computers is implemented via components. Components are represented by Lua's Userdata (short: UD) type, which in our case are represented by Java objects which are provided by items/blocks.

Components are generally accessed by calling components:getFirst("yourComponentType"), for more information see Computer and the wiki page of any other item/block that provides a component. The components field is a global field injected into every computer Lua instance during initialization.