Advanced Peripherals Inventory Manager Input Source
lua
telem.input.advancedPeripherals.inventoryManager (
peripheralID: string,
categories?: string[] | '*'
)Mod Dependencies
Requires Advanced Peripherals.
See the Usage section for a complete list of the metrics in each category.
| Name | Type | Default |
|---|---|---|
peripheralID | string | nil |
| Peripheral ID of the Inventory Manager | ||
categories | string[] | "*" | { "basic" } |
List of metric categories to query. The value lua | ||
Usage
lua
local telem = require 'telem'
local backplane = telem.backplane()
:addInput('my_inventoryManager', telem.input.advancedPeripherals.inventoryManager('right', '*'))
:cycleEvery(5)()Given a Inventory Manager peripheral on the right side of the computer, this appends the following metrics to the backplane (grouped by category here for clarity):
Basic
| Name | Value | Unit |
|---|---|---|
apinv:equipped | 0 or 1 | |
apinv:equipped_helmet | 0 or 1 | |
apinv:equipped_chestplate | 0 or 1 | |
apinv:equipped_leggings | 0 or 1 | |
apinv:equipped_boots | 0 or 1 | |
apinv:inventory_available | 0 or 1 | |
apinv:inventory_slots_available | 0 - inf |
Storage
Given an Inventory Manager peripheral containing a memory card tied to a player with the following inventory:

This appends the following metrics to the backplane:
| Name | Value | Unit |
|---|---|---|
storage:minecraft:redstone | 45 | item |
storage:minecraft:spruce_planks | 8 | item |