uepyon

TreeChopper

May 16th, 2023 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. --2x2 Tree Chopper by mtbfreak
  2. --Variables
  3. local height = 0
  4.  
  5. --Functions
  6. function chopUp()
  7. turtle.digUp()
  8. turtle.up()
  9. turtle.dig()
  10. height = height + 1
  11. end
  12.  
  13. function moveOver()
  14. turtle.turnLeft()
  15. turtle.dig()
  16. turtle.forward()
  17. turtle.turnRight()
  18. turtle.dig()
  19. end
  20.  
  21. function chopDown()
  22. turtle.digDown()
  23. turtle.down()
  24. turtle.dig()
  25. end
  26.  
  27. --Main Script
  28. turtle.dig()
  29. turtle.forward()
  30. turtle.dig()
  31.  
  32. while turtle.detectUp() == true do
  33. chopUp()
  34. end
  35.  
  36. moveOver()
  37.  
  38. for i = 1, height, 1 do
  39. chopDown()
  40. end
  41.  
  42. shell.run("go right forward left back")
Tags: minecraft
Add Comment
Please, Sign In to add comment