Advertisement
gungun974

Untitled

May 3rd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. --[[
  2. Program made by gungun974
  3. mine is a program designed to undermine
  4. ]]--
  5.  
  6. -- declaration
  7. local succes, data = turtle.inspect()
  8.  
  9. -- function
  10. function getBlock( block )
  11. if succes then
  12. if data.name == block then
  13. return true
  14. succes, data = turtle.inspect()
  15. else
  16. return false
  17. succes, data = turtle.inspect()
  18. end
  19. else
  20. return false
  21. succes, data = turtle.inspect()
  22. end
  23. end
  24.  
  25. -- start
  26.  
  27.  
  28. -- loop
  29. while true do
  30. if getBlock("minecraft:iron_ore") then
  31. print(getBlock("minecraft:iron_ore"))
  32. turtle.dig()
  33. end
  34. end
  35. while false do
  36. turtle.dig()
  37. turtle.forward()
  38. turtle.turnLeft()
  39. if getBlock("minecraft:iron_ore") then
  40. turtle.dig()
  41. end
  42. turtle.digUp()
  43. turtle.up()
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement