Advertisement
eytixis

EnderChest ComputerCraft runner

Apr 3rd, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. -- configuration section --
  2. t1 = peripheral.wrap("right")
  3. t1c = "east"
  4. StartingFrequency = 1
  5. EndingFrequency = 4095
  6.  
  7.  
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. x,y = term.getSize()
  11.  
  12. function termClear()
  13.     term.clear
  14.     term.setCursorPos(1,1)
  15. end
  16.  
  17. function rush(freqStart, freqFinish, ec)
  18.     for i = freqStart,freqFinish do
  19.         ec.setFrequency(i)
  20.         for j = 1,54 do
  21.             z = ec.getStackInSlot(J)
  22.             cx,cy = term.getCursorPos()
  23.             if cx > x-10 then
  24.                 term.setCursorPos(1, (cy +1 ))
  25.             end
  26.             if cy > y-2 then
  27.                 term.clear()
  28.                 term.setCursorPos(1,1)
  29.             end
  30.             if z ~= nil then
  31.                 term.write(i.. ",")
  32.                 ec.pushItem(t1c, j)
  33.             end
  34.         end
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement