Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vault = peripheral.wrap("create:item_vault_1")
- mon = peripheral.wrap("top")
- function titlecase(first,rest)
- return first:upper()..rest:lower()
- end
- while true do
- ore = vault.list()
- amount = 0
- for _, qty in ipairs(ore) do
- amount = amount + qty.count
- end
- fullname = ore[1].name
- name = string.gsub(fullname, "minecraft:","")
- name = string.gsub(name,"_", " ")
- name = string.gsub(name,"(%a)([%w_']*)", titlecase)
- store = amount.." of "..vault.size()*64
- term.setCursorPos(1,1)
- term.write(name)
- term.setCursorPos(1,2)
- term.write(store)
- mon.setCursorPos(1,1)
- mon.write(name)
- mon.setCursorPos(1,2)
- mon.write(store)
- end
Advertisement
Add Comment
Please, Sign In to add comment