Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chest = peripheral.find("sc-goodies:diamond_chest")
- local total = 0
- local itemDetail = chest.getItemDetail(1)
- for slot, item in pairs(chest.list()) do
- print(("%d x %s in slot %d"):format(item.count, item.name, slot))
- end
- print(chest.size())
- for i = 1, chest.size() do
- total = total + chest.getItemLimit(i)
- end
- print("Free:", (total))
- if not itemDetail then print("No item") return end
- print(("%s (%s)"):format(itemDetail.displayName, itemDetail.name))
- print(("Count: %d/%d"):format(itemDetail.count, itemDetail.maxCount))
- if itemDetail.damage then
- print(("Damage: %d/%d"):format(itemDetail.damage, itemDetail.maxDamage))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement