Advertisement
CelticCoder

turtleSugarFarm

Jun 18th, 2024 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. os.loadAPI("simpleQuarry.lua")
  2. os.loadAPI("turtleChest.lua")
  3. os.loadAPI("getTurtleFuel.lua")
  4. width = 14 --"Enter Length: "
  5. length = 1 --"Enter Width: "
  6. depth = 2 --"Enter Depth"
  7.  
  8. function line()
  9.     turtle.digDown()
  10.     turtle.down()
  11.     turtle.digDown()
  12.     turtle.down()
  13.     turtle.up()
  14.     turtle.up()
  15.     simpleQuarry.quarry(width, length, depth)
  16. end
  17.  
  18. function nextLine()
  19.     turtle.turnRight()
  20.     turtle.dig()
  21.     turtle.forward()
  22.     turtle.turnLeft()
  23. end
  24.  
  25. function skipWater()
  26.     turtle.turnRight()
  27.     turtle.forward()
  28.     turtle.dig()
  29.     turtle.forward()
  30.     turtle.turnLeft()
  31. end
  32.  
  33. function cutBlock()
  34.     line()
  35.     nextLine()
  36.     line()
  37. end
  38.  
  39. function forward(loop)
  40.     while loop ~= 0 do
  41.         turtle.forward()
  42.         loop = loop - 1
  43.     end
  44. end
  45.  
  46. function returnToStart()
  47.     turtle.turnLeft()
  48.     forward(13)
  49.     turtle.turnLeft()
  50.     turtleChest.insertAll()
  51.     turtle.turnLeft()
  52.     turtle.turnLeft()
  53. end
  54.  
  55. while true do
  56.     if turtle.inspect() then
  57.         cutBlock()
  58.         skipWater()
  59.         cutBlock()
  60.         skipWater()
  61.         cutBlock()
  62.         skipWater()
  63.         cutBlock()
  64.         skipWater()
  65.         cutBlock()
  66.         returnToStart()
  67.         getTurtleFuel.displayFuelInfo()
  68.     end
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement