Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.find("monitor")
- inSize = chest.size()
- chest = peripheral.find("minecraft:chest")
- x,y = mon.getSize()
- monCenter = (x/2 + y/2)/2
- slot = 0
- currentItems = 0
- maxItems = 0
- while true do
- if slot >= inSize then
- mon.setBackgroundColor(colors.gray)
- mon.setTextColor(colors.red)
- slot = slot - slot
- mon.write(currentItems.. "/" ..maxItems)
- sleep(15)
- end
- slot = slot + 1
- item = chest.getItemDetail(slot)
- itemlimit = chest.getItemLimit(slot)
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.setCursorPos(monCenter)
- mon.write("Counting...")
- currentItems = CurrentItems + item.count
- maxItems = maxItems + itemlimit
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement