Component : inventory controller

logo

Description

This component is provided by the inventory controller upgrade.

Component name: inventory_controller.

Methods

Example

            
-- https://ocdoc.cil.li/component:inventory_controller
local component = require("component")
local sides = require("sides")
 
local slot = 1
local item = component.inventory_controller.getStackInInternalSlot(slot)
 
if item then
                                print("Item name: ", item.name)
                                print("Item count: ", item.size)
                                print("Item damage: ", item.damage)
else
                                print("Slot " .. slot .. " is empty")
end