Advertisement
osmarks

Cobble Compressor

May 11th, 2020
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function g64(tbl)
  2.     for i=1,#tbl do
  3.         local total = 0
  4.         repeat
  5.             local count = peripheral.call("front", "pushItems", "south", 1, 64, tbl[i])
  6.             if count == 0 then sleep(0.5) end
  7.             print(tbl[i], count)
  8.             total = total + count
  9.         until total == 64 or turtle.getItemCount(tbl[i]) == 64
  10.     end
  11. end
  12. local function push()
  13.     peripheral.call("top", "pullItems", "down", 4, 64, 1)
  14. end
  15. turtle.select(4)
  16. while true do
  17.     g64 {1,2,3,5,6,7,9,10,11}
  18.     push()
  19.     while turtle.getItemCount(4) > 0 do sleep(0.5) push() end
  20.     turtle.craft()
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement