Advertisement
Risk_exe

Untitled

Apr 18th, 2022
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 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,16,1 do
  27. local x = turtle.getItemDetail(i);
  28. if x == nil or x["name"] == "minecraft:ancient_debris" or x["name"] == "minecraft:gold_nugget" or x["name"] == "minecraft:quartz" then
  29. -- literally just do not do anything...
  30. else
  31. turtle.select(i);
  32. turtle.drop();
  33. end
  34. end
  35. turtle.select(holder);
  36. end
  37.  
  38. local exvac = true;
  39.  
  40. function Begin()
  41. turtle.select(1);
  42. turtle.refuel();
  43. turtle.turnLeft();
  44.  
  45. for x = 1, 16, 1 do
  46.  
  47. for i = 1, 16, 1 do
  48. Forward();
  49. end
  50.  
  51. if exvac then
  52. turtle.turnRight(); Forward(); turtle.turnRight();
  53. else
  54. turtle.turnLeft(); Forward(); turtle.turnLeft();
  55. end
  56. exvac = not exvac;
  57. Excrete_netherrack();
  58.  
  59. end
  60.  
  61. --[[ return to position ]]
  62. turtle.turnLeft();
  63. for i=1, 16, 1 do
  64. turtle.forward();
  65. end
  66. turtle.turnLeft(); turtle.turnLeft();
  67. Wait();
  68. end
  69.  
  70. function Wait()
  71. while true do
  72. local event = os.pullEvent("redstone");
  73. Up();
  74. Begin();
  75. end
  76. end
  77.  
  78. while true do
  79. local event = os.pullEvent("redstone");
  80. Excrete_netherrack();
  81. -- Begin();
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement