Jeyjey0

Turtle api

Oct 24th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. function mine()
  2. turtle.dig()
  3. mine.gravel()
  4. turtle.digUp()
  5. end
  6.  
  7. function bridge()
  8. if turtle.detectDown() == false then
  9. drop = 0
  10. for i=1,16 do
  11. drop = drop + 1
  12. turtle.select(drop)
  13. icount = turtle.getItemCount()
  14. if icount >= 1 == true then
  15. local item = turtle.getItemDetail()
  16. if item.name == "minecraft:dirt" == true then
  17. turtle.placeDown()
  18. turtle.select(1)
  19. break
  20. else
  21. end
  22. else
  23. end
  24. end
  25. end
  26. end
  27.  
  28.  
  29. function clear()
  30. drop = 0
  31. for i = 1,16 do
  32. drop = drop + 1
  33. turtle.select(drop)
  34. turtle.drop()
  35. end
  36. end
  37.  
  38.  
  39. function torch()
  40. drop = 0
  41. for i=1,16 do
  42. drop = drop + 1
  43. turtle.select(drop)
  44. icount = turtle.getItemCount()
  45. if icount >= 1 == true then
  46. local item = turtle.getItemDetail()
  47. if item.name == "minecraft:torch" == true then
  48. turtle.turnLeft()
  49. turtle.turnLeft()
  50. turtle.place()
  51. turtle.turnLeft()
  52. turtle.turnLeft()
  53. turtle.select(1)
  54. break
  55. else
  56. end
  57. else
  58. end
  59. end
  60. end
Add Comment
Please, Sign In to add comment