sneed

Untitled

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