ShivaFang

Untitled

Sep 12th, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. function getBlock()
  2.   turtle.suckDown()  
  3. end
  4.  
  5. function checkSlot()
  6.   if (turtle.getItemCount(1)) == 1 then
  7.     turtle.drop()
  8.   end  
  9.   if (turtle.getItemCount(1)) == 0 then
  10.     getBlock()
  11.   else
  12.     turtle.place()
  13.   end
  14. end
  15.  
  16. function run()
  17.   turtle.select(1)
  18.   while true do  
  19.     checkSlot()
  20.   end
  21. end
  22.  
  23. run()
Advertisement
Add Comment
Please, Sign In to add comment