Advertisement
Efud933

farmFull1.1

Dec 31st, 2021
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. os.loadAPI("Farm4")
  2. os.loadAPI("inspection.lua")
  3. --Loads required apis
  4.  
  5. run = true
  6. faceInit = true
  7. --Initial run settings
  8.  
  9. blocksToReset = 17
  10. --Blocks to move back to start(adjustable)
  11.  
  12. --Main loop body
  13. while run == true do
  14. --print(inspection.viewBlock())
  15. viewedBlock = inspection.viewBlock()
  16. print(viewedBlock)
  17.  
  18. if viewedBlock == "minecraft:chest" then
  19. for num = 2,16 do
  20. turtle.select(num)
  21. turtle.drop()
  22. end
  23. turtle.turnLeft()
  24. for num = 1, blocksToReset do
  25. turtle.forward()
  26. end
  27. turtle.turnLeft()
  28. faceInit = true
  29. os.sleep(600)
  30. end
  31.  
  32. if turtle.detect() == false then
  33. Farm4.moveDetect()
  34. Farm4.plant()
  35. else
  36. if faceInit == true then
  37. turtle.turnLeft()
  38. turtle.forward()
  39. turtle.turnLeft()
  40. faceInit = false
  41. else
  42. turtle.turnRight()
  43. turtle.forward()
  44. turtle.turnRight()
  45. faceInit = true
  46. end
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement