Advertisement
Guest User

sorter

a guest
Dec 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. chest = peripheral.wrap('left')
  2. stacks = chest.getAllStacks()
  3.  
  4. for i = 1, #stacks do
  5.   --print(i)
  6.   item = stacks[i]
  7.   item_info_basic = item.basic()
  8.   item_info_all = item.all()
  9.   item_name_raw = item_info_basic.raw_name
  10.   item_name = item_info_basic.name
  11.   item_name_display = item_info_basic.display_name
  12.   --print(table.unpack(item_info_basic))
  13.   --print(table.unpack(item_info_all))
  14.   print(string.format('%s: %s', i, item_name_raw))
  15.   if item_name == 'Ore' then
  16.     print(string.format('\tORE: %s - %s', item_name_display, i))
  17.   end
  18.   os.pullEvent('key')
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement