FluxWareScripting
Back to site

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|nil
inventory.getOffhand() -> table|nil
inventory.getArmor() -> table

Four entries, helmet first; nil where empty.

inventory.selectedSlot() -> number
inventory.selectSlot(slot:number)

Hotbar only, 0-8. Out of range is ignored.

inventory.findItem(id:string) -> number|nil

First slot holding that registry id.

inventory.countItem(id:string) -> number

Total across every slot, counting stack sizes.