Advertisement
MigasRocha

Chunk Miner

Nov 21st, 2023 (edited)
1,157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.34 KB | Gaming | 0 0
  1. function turnAround()
  2.  
  3.     turtle.turnLeft()
  4.     turtle.turnLeft()
  5. end
  6.  
  7.  
  8. function refuel()
  9.  
  10.     if turtle.getFuelLevel() < 100 then
  11.         turtle.select(2) --- slot 2 refuel chest ---
  12.     if turtle.detectUp then
  13.         turtle.digUp()
  14.         turtle.placeUp()
  15.         turtle.suckUp()
  16.         turtle.refuel()
  17.         turtle.dropUp()
  18.         turtle.digUp()
  19.       end
  20.     end
  21. end
  22.  
  23. function wholechunk()
  24.  
  25.     refuel()
  26.     for a=1,15 do
  27.         turtle.detect()
  28.         turtle.dig()
  29.         turtle.forward()
  30.         end
  31. end
  32.  
  33. function chunkload()
  34.  
  35.  
  36.     turtle.detectUp()
  37.     turtle.digUp()
  38.     turtle.select(16) ---slot 16 chunkloader---
  39.     turtle.placeUp()
  40.  
  41. wholechunk()
  42.  
  43. turtle.detectUp()
  44. turtle.digUp()
  45. turtle.placeUp()
  46.  
  47. turnAround()
  48.  
  49. turtle.forward()
  50. turtle.forward()
  51. turtle.forward()
  52.  
  53. end
  54.  
  55. --- A turtle está agora na posição 13 pronta para colocar builder ---
  56.  
  57. function builder()
  58.  
  59. refuel()
  60.     turtle.select(4) ---slot 4 builder ---
  61.     turnAround()
  62.     turtle.place()
  63.     turtle.digDown()
  64.     turtle.down()
  65.     turtle.dig()
  66.     turtle.select(1) ---slot 1 quantum entagloporter---
  67.     turtle.place()
  68.     turtle.up()
  69.     turtle.turnLeft()
  70.     turtle.detect()
  71.     turtle.dig()
  72.     turtle.forward()
  73.     turtle.turnRight()
  74.     turtle.detect()
  75.     turtle.dig()
  76.     turtle.select(5) ---slot 5 redstone torch ---
  77.     turtle.place()
  78.     turtle.turnRight()
  79.     turtle.forward()
  80.     turtle.turnLeft()
  81. end
  82.  
  83. function firstphase()
  84.  
  85. chunkload()
  86. builder()
  87.  
  88. end
  89.  
  90. function secondphase()
  91.  
  92. function backUp()
  93.  
  94.     refuel()
  95.     for b=1,178 do
  96.         turtle.up()
  97.     end
  98. end
  99.  
  100.  
  101. function standby()
  102.  
  103.     while turtle.detect() == true do
  104.           sleep(1)
  105.         if turtle.detect() == false then
  106.         backUp()
  107.         end
  108.     end
  109. end
  110.  
  111. function netherrack()
  112.  
  113.     local sucess, data = turtle.inspectDown()
  114.         if sucess == true then
  115.             if data.name == "minecraft:bedrock" then
  116.                 turtle.turnRight()
  117.                 turtle.select(15) ---slot 15 bloco de netherrack---
  118.                 turtle.place()
  119.                 standby()
  120.             end
  121.         end
  122. end
  123.  
  124.  
  125. function goDown()
  126.  
  127.     refuel()
  128.     while true do
  129.         turtle.digDown()
  130.         turtle.down()
  131.         netherrack()
  132.     end
  133. end
  134.  
  135. goDown()
  136. standby()
  137. backUp()
  138.  
  139. end
  140.  
  141. firstphase()
  142. secondphase()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement