Advertisement
Guest User

farm2

a guest
Mar 19th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. if turtle.getFuelLevel == 0
  2.     then turtle.refuel(1)
  3. end
  4.  
  5. local count = 0
  6. turtle.select(13) turtle.suckUp(64)
  7. turtle.select(14) turtle.suckUp(64)
  8. turtle.select(15) turtle.suckUp(64)
  9. turtle.select(16) turtle.suckUp(64)
  10.  
  11. local spot = 0
  12.  
  13. while count < 16
  14.     do if turtle.getFuelLevel() < 20
  15.         then turtle.select(1)
  16.         turtle.refuel(2)
  17.     end
  18.  local nofail,data = turtle.inspectDown()
  19.  if data.metadata == 7 then
  20.     turtle.digDown()
  21.   end
  22.  
  23.     while turtle.getItemCount(13) == 0
  24.         do spot = spot + 1
  25.         turtle.select(spot)
  26.         turtle.transferTo(13)
  27.     end
  28.  
  29.     turtle.select(13)
  30.     turtle.placeDown()
  31.  
  32.   if turtle.detect() == false
  33.   then turtle.forward()
  34.   end
  35.     if turtle.detect()
  36.   then count = count + 1
  37.   if count < 16 then
  38.         if count % 2 == 0
  39.             then turtle.turnLeft()
  40.    turtle.digDown()
  41.    turtle.placeDown(13)
  42.             turtle.forward()
  43.             turtle.turnLeft()
  44.         else
  45.             turtle.turnRight()
  46.   turtle.digDown()
  47.    turtle.placeDown(13)
  48.             turtle.forward()
  49.             turtle.turnRight()
  50.         end
  51.     end
  52. end
  53. end
  54.  
  55. turtle.turnLeft()
  56.  
  57. while turtle.detect() == false do turtle.forward() end
  58.  
  59. turtle.turnRight()
  60.  
  61. turtle.forward() turtle.forward()
  62.  
  63. for i=2,16 do
  64.     turtle.select(i)
  65. if turtle.getItemCount() ~= 0 then
  66. local data = turtle.getItemDetail()
  67.     if data.name == "minecraft:wheat_seeds"
  68.         then turtle.dropUp(64)
  69.  else turtle.drop(64)
  70. end
  71. end
  72. end
  73. turtle.turnLeft() turtle.turnLeft()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement