inventory
Read and simple manipulation. Slots are Minecraft's numbering: 0-8 hotbar, 9-35 main, 36-39 armor, 40 offhand.
Functions
8 functions. Signatures are generated from the client, so they describe the build you are running.
inventory.getSlot(slot:number) -> table|nil{id, name, count, damage, maxDamage, maxCount}, or nil when empty.
inventory.getHeldItem() -> table|nilinventory.getOffhand() -> table|nilinventory.getArmor() -> tableFour entries, helmet first; nil where empty.
inventory.selectedSlot() -> numberinventory.selectSlot(slot:number)Hotbar only, 0-8. Out of range is ignored.
inventory.findItem(id:string) -> number|nilFirst slot holding that registry id.
inventory.countItem(id:string) -> numberTotal across every slot, counting stack sizes.