Advertisement
RabaGhast

Sugar

Oct 25th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. local turn = 0
  2. if turtle.getFuelLevel() < 100 then
  3.   print("Warning! Fuel level is at "..turtle.getFuelLevel())
  4. end
  5.  
  6. while true do
  7.   local success, data = turtle.inspect()
  8.   if data.name == "minecraft:reeds" then
  9.     print("Initiating harvest")
  10.     turn = 0
  11.     turtle.dig()
  12.     while true do
  13.       if turn == 4 then
  14.     for i=1,16 do
  15.           turtle.select(i)
  16.           turtle.dropDown()
  17.         end
  18.         turtle.select(1)
  19.         break
  20.       end
  21.       turtle.forward()
  22.       local success, data = turtle.inspectDown()
  23.       if success and (data.name == "minecraft:reeds") then
  24.         turtle.dig()
  25.     turtle.digDown()
  26.      elseif success and (data.name == "JABBA:barrel") then
  27.     print("poopy time")
  28.     turtle.turnRight()
  29.         turtle.dig()
  30.         turn = turn + 1
  31.      else
  32.     turtle.down()
  33.     local success2, data2 = turtle.inspectDown()
  34.     if success2 and (data2.name == "minecraft:reeds") then
  35.       turtle.up()
  36.     else
  37.       turtle.up()
  38.       turtle.turnRight()
  39.           turtle.dig()
  40.           turn = turn + 1
  41.         end
  42.       end
  43.     end
  44.   else
  45.     print("No growth. Sleep mode activated")
  46.     sleep(60)
  47.   end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement