Advertisement
RedstoneExpert

NetherTurtle

Aug 28th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. function forceDown()
  2. while(turtle.down()==false) do
  3. turtle.digDown()
  4. end
  5. end
  6. function forceFront()
  7. while(turtle.forward()==false) do
  8. turtle.dig()
  9. end
  10. end
  11. function forceUp()
  12. while(turtle.up()==false) do
  13. turtle.digUp()
  14. end
  15. end
  16. print("Now Mining until fuel runs out")
  17. while true do
  18. for i=1,100000 do
  19. while(turtle.detect()==true) do
  20. forceFront()
  21. end
  22. turtle.turnRight()
  23. if turtle.detect == false do
  24. turtle.turnRight()
  25. if turtle.detect == false do
  26. turtle.turnRight()
  27. if turtle.detect == false do
  28. if turtle.detectUp == true do
  29. forceUp()
  30. end
  31. else
  32. if turtle.detectDown == true do
  33. forceDown()
  34. end
  35. else
  36. for i=1,10 do
  37. forceFront()
  38. end
  39. end
  40. end
  41. end
  42. end
  43. end
  44. end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement