local robot = require("robot") local component = require("component") local inventory = component.inventory_controller; ---Place a torch above the robot ---@param side number|nil which side of the empty space to place the torch local function place_torch(side) local stack = inventory.getStackInInternalSlot(1) if stack.name == "minecraft:torch" then robot.select(1) robot.placeUp(side) else print('Out of torches') end end return { place_torch = place_torch }