SHARE
TWEET

sugarcanebot

xmann110 Feb 7th, 2020 (edited) 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function refuel()
  2.     if turtle.getFuelLevel() < 10 then
  3.         turtle.select(1)
  4.         turtle.refuel(1)
  5.     end
  6. end
  7.  
  8. function harvest_row()
  9.     for i=1, 128 do
  10.         refuel()
  11.         turtle.dig()
  12.         turtle.forward()
  13.         turtle.digDown()
  14.     end
  15. end
  16.  
  17. function harvest_section()
  18.     harvest_row()
  19.     turtle.forward()
  20.     turtle.turnLeft()
  21.     turtle.forward()
  22.     turtle.turnLeft()
  23.     harvest_row()
  24.     turtle.forward()
  25. end
  26.  
  27. while true do
  28.     while turtle.detectDown() do
  29.         print("Waiting for piston retraction")
  30.         sleep(1)
  31.     end
  32.     turtle.select(1)
  33.     while turtle.getItemCount() < 16 do
  34.         turtle.suckUp(16 - turtle.getItemCount())
  35.     end
  36.     harvest_section()
  37.     refuel()
  38.     for v=2, 16 do
  39.         turtle.select(v)
  40.         turtle.dropDown()
  41.     end
  42.     turtle.turnLeft()
  43.     turtle.forward()
  44.     turtle.turnLeft()
  45. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top