Jump to content

Component: Difference between revisions

From Advanced Computers Wiki
Created page with "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 <code>computer:getFirst("yourComponentType")</code>, for more information see {{Component:Computer}}."
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
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.
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 <code>computer:getFirst("yourComponentType")</code>, for more information see {{Component:Computer}}.
Components are generally accessed by calling <code>components:getFirst("yourComponentType")</code>, for more information see [[Computer]] and the wiki page of any other item/block that provides a component. The <code>components</code> field is a global field injected into every computer Lua instance during initialization.
 
{{Navbox content}}

Latest revision as of 23:19, 1 August 2026

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.