Advertisement
sneed

Untitled

Aug 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. local Bool = false
  2. local searchedBlock = "minecraft:diamond_ore"
  3. function Fackel()
  4. turtle.select(2)
  5. turtle.placeUp()
  6. end
  7. function fDown()
  8.  
  9. turtle.digDown()
  10. turtle.down()
  11. end
  12. function UmschauenUpDown()
  13. success, data = turtle.inspectUp()
  14. if data.name == searchedBlock then
  15. turtle.digUp()
  16. end
  17. success, data = turtle.inspectDown()
  18. if data.name == searchedBlock then
  19. turtle.digDown()
  20. end
  21. end
  22. function Umschauen()
  23. for i=1, 4 do
  24. turtle.turnLeft()
  25. success, data = turtle.inspect()
  26. if data.name == searchedBlock then
  27. local Bool = true
  28. turtle.dig()
  29.  
  30. end
  31. end
  32.  
  33. function Ausheben()
  34. for u=1, 4 do
  35. turtle.forward()
  36. Umschauen()
  37. UmschauenUpDown()
  38. turtle.back()
  39. turtle.turnLeft()
  40. end
  41. end
  42. end
  43.  
  44.  
  45.  
  46.  
  47.  
  48. for p=1,10 do
  49. fDown()
  50. Umschauen()
  51. if Bool == true then
  52. Ausheben()
  53. else Fackel()
  54. end
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement