Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. function isblocknear(id)
  2. local success, data = turtle.inspect()
  3. if success then
  4. if id == data.name then
  5. return true
  6. end
  7. end
  8.  
  9. local success, data = turtle.inspectUp()
  10. if success then
  11. if id == data.name then
  12. return true
  13. end
  14. end
  15.  
  16. local success, data = turtle.inspectDown()
  17. if success then
  18. if id == data.name then
  19. return true
  20. end
  21. end
  22.  
  23. turtle.turnRight()
  24. local success, data = turtle.inspect()
  25. if success then
  26. if id == data.name then
  27. return true
  28. end
  29. end
  30. turtle.turnRight()
  31. local success, data = turtle.inspect()
  32. if success then
  33. if id == data.name then
  34. return true
  35. end
  36. end
  37. turtle.turnRight()
  38. local success, data = turtle.inspect()
  39. if success then
  40. if id == data.name then
  41. return true
  42. end
  43. end
  44. turtle.turnRight()
  45. end
  46.  
  47. print(isblocknear("minecraft:dirt"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement