Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local height = 4
  2. local width = 9
  3.  
  4. function forward()
  5. turtle.forward()
  6. end
  7.  
  8. function up()
  9. turtle.up()
  10. end
  11.  
  12. function down()
  13. turtle.down()
  14. end
  15.  
  16. function left()
  17. turtle.turnLeft()
  18. forward()
  19. turtle.turnRight()
  20. end
  21.  
  22. function right()
  23. turtle.turnRight()
  24. forward()
  25. turtle.turnLeft()
  26. end
  27.  
  28. function chop()
  29. turtle.dig()
  30. end
  31.  
  32. function chopUp()
  33. turtle.digUp()
  34. end
  35.  
  36. function goToFloor()
  37. for i = 0,height,1 do
  38. down()
  39. end
  40. end
  41.  
  42. function mineRow()
  43. for i = 0,width,1 do
  44. local tree = true
  45. if tree then
  46. mineTree()
  47. end
  48.  
  49. left()
  50. end
  51. end
  52.  
  53. function goBackToStart()
  54. turtle.turnRight()
  55. for i = 0,width,1 do
  56. forward()
  57. end
  58. turtle.turnLeft()
  59. end
  60.  
  61. function mineTree()
  62. for i = 0,height,1 do
  63. chop()
  64. chopUp()
  65. up()
  66. end
  67.  
  68. for i = 0,height,1 do
  69. down()
  70. end
  71. end
  72.  
  73. mineRow()
  74. mineTree()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement