Advertisement
Risk_exe

Untitled

Apr 13th, 2022
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1.  
  2. function Down()
  3. if turtle.detectDown() then
  4. turtle.digDown();
  5. end
  6. turtle.down();
  7. end
  8.  
  9. function Up()
  10. while turtle.detectUp() do
  11. turtle.digUp();
  12. end
  13. turtle.up();
  14. end
  15.  
  16. function Forward()
  17. while turtle.detect() do
  18. turtle.dig();
  19. end
  20. turtle.forward();
  21. end
  22.  
  23.  
  24. function Excrete_netherrack()
  25. local holder = turtle.getSelectedSlot();
  26. for i=1,20,1 do
  27. local x = turtle.getItemDetail(i)
  28. if x == nil then
  29. -- break;
  30. -- literally just do not do anything...
  31. else
  32. if x.name == 'minecraft:netherrack' then
  33. turtle.select(i);
  34. turtle.drop();
  35. end
  36. end
  37. end
  38. turtle.select(holder);
  39. end
  40.  
  41. local exvac = true;
  42.  
  43. function Begin()
  44. turtle.select(1);
  45. turtle.refuel();
  46. turtle.turnLeft();
  47.  
  48. for x = 1, 20, 1 do
  49.  
  50. for i = 1, 20, 1 do
  51. Forward();
  52. end
  53.  
  54. if exvac then
  55. turtle.turnRight(); Forward(); turtle.turnRight();
  56. else
  57. turtle.turnLeft(); Forward(); turtle.turnLeft();
  58. end
  59. exvac = not exvac;
  60. Excrete_netherrack();
  61.  
  62. end
  63.  
  64. --[[ return to position ]]
  65. turtle.turnLeft();
  66. for i=1, 20, 1 do
  67. turtle.forward();
  68. end
  69. turtle.turnLeft(); turtle.turnLeft();
  70. Wait();
  71. end
  72.  
  73. function Wait()
  74. while true do
  75. local event = os.pullEvent("redstone");
  76. Up();
  77. Begin();
  78. end
  79. end
  80.  
  81. while true do
  82. local event = os.pullEvent("redstone");
  83. Begin();
  84. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement