Advertisement
sneed

Untitled

Aug 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. state = turtle.detect()
  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.  
  24. turtle.turnLeft()
  25. success, data = turtle.inspect()
  26. if data.name == searchedBlock then
  27. turtle.dig()
  28. end
  29. turtle.turnLeft()
  30. success, data = turtle.inspect()
  31. if data.name == searchedBlock then
  32. turtle.dig()
  33. end
  34. turtle.turnLeft()
  35. success, data = turtle.inspect()
  36. if data.name == searchedBlock then
  37. turtle.dig()
  38. end
  39. turtle.turnLeft()
  40. success, data = turtle.inspect()
  41. if data.name == searchedBlock then
  42. turtle.dig()
  43. end
  44. end
  45.  
  46.  
  47. function Ausheben()
  48. for u=1, 4 do
  49. turtle.forward()
  50. Umschauen()
  51. UmschauenUpDown()
  52.  
  53. turtle.back()
  54.  
  55. end
  56. end
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. for p=1,10 do
  64. fDown()
  65. Umschauen()
  66. if state == false then
  67. Ausheben()
  68. else Fackel()
  69.  
  70. end
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement