Drakaxx

FarmSugarCane

Oct 27th, 2020
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function dropIfFull()
  2. for i=1,16 do
  3. turtle.select(i)
  4. local itemDetail = turtle.getItemDetail()
  5. if itemDetail then
  6. turtle.dropUp()
  7. end
  8. end
  9. end
  10.  
  11. function digIfNeeded()
  12. local success, data = turtle.inspect()
  13. if success then
  14. turtle.dig()
  15. end
  16. turtle.turnRight()
  17. turtle.suck()
  18. turtle.suckDown()
  19. end
  20.  
  21. steps = 1
  22.  
  23. while true do
  24. dropIfFull()
  25. digIfNeeded()
  26. steps = steps + 1
  27.  
  28. if steps == 5 then
  29. os.sleep(30)
  30. steps = 1
  31. end
  32. end
Add Comment
Please, Sign In to add comment