Advertisement
Burrito33

Untitled

Aug 22nd, 2023 (edited)
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. local w = 22 --width
  2. local r = 26 --row
  3. local i = 1
  4. x = 0
  5.  
  6.  
  7. print(x)
  8. repeat
  9. x = x + 1
  10. repeat
  11. local success, data = turtle.inspectDown()
  12. if success then
  13. if (data["state"]["age"] == 7) then --has been changed from data.metadata/ if this doesnt work try data.stage.age
  14. turtle.digDown()
  15. turtle.placeDown()
  16. end
  17. end
  18. turtle.forward()
  19. i = i + 1
  20. until i == w
  21. turtle.digDown()
  22. if (x % 2 == 0) then
  23. turtle.turnLeft()
  24. if success then
  25. if (data["state"]["age"] == 7) then
  26. turtle.digDown()
  27. end
  28. end
  29. turtle.forward()
  30. turtle.placeDown()
  31. turtle.turnLeft()
  32. i = 1
  33. else
  34. turtle.turnRight()
  35. if success then
  36. if (data["state"]["age"] == 7) then
  37. turtle.digDown()
  38. turtle.placeDown()
  39. end
  40. end
  41. turtle.forward()
  42. turtle.placeDown()
  43. turtle.turnRight()
  44. i = 1
  45. end
  46. print(x)
  47. until x == r
  48. turtle.dropDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement