Advertisement
PrinceOfCookies

Untitled

Feb 10th, 2023 (edited)
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. function mineChunk(depth, width, length)
  2. for i = 1, depth do
  3. for j = 1, width do
  4. turtle.dig()
  5. turtle.forward()
  6. end
  7. if i % 2 == 0 then
  8. turtle.turnRight()
  9. turtle.forward()
  10. turtle.turnRight()
  11. else
  12. turtle.turnLeft()
  13. turtle.forward()
  14. turtle.turnLeft()
  15. end
  16. for j = 1, width do
  17. turtle.dig()
  18. turtle.forward()
  19. end
  20. if i % 2 == 0 then
  21. turtle.turnLeft()
  22. turtle.back()
  23. turtle.turnLeft()
  24. else
  25. turtle.turnRight()
  26. turtle.back()
  27. turtle.turnRight()
  28. end
  29. turtle.digDown()
  30. turtle.down()
  31. end
  32.  
  33. for i = 1, width do
  34. turtle.dig()
  35. turtle.forward()
  36. end
  37.  
  38. if length % 2 == 0 then
  39. turtle.turnRight()
  40. else
  41. turtle.turnLeft()
  42. end
  43. turtle.forward()
  44. if length % 2 == 0 then
  45. turtle.turnRight()
  46. else
  47. turtle.turnLeft()
  48. end
  49. for i = 1, width do
  50. turtle.dig()
  51. turtle.forward()
  52. end
  53. if length % 2 == 0 then
  54. turtle.turnLeft()
  55. else
  56. turtle.turnRight()
  57. end
  58. turtle.back()
  59. if length % 2 == 0 then
  60. turtle.turnLeft()
  61. else
  62. turtle.turnRight()
  63. end
  64.  
  65. for i = 1, depth do
  66. turtle.up()
  67. end
  68.  
  69. for i = 1, length - 1 do
  70. if length % 2 == 0 then
  71. turtle.turnRight()
  72. else
  73. turtle.turnLeft()
  74. end
  75. turtle.forward()
  76. if length % 2 == 0 then
  77. turtle.turnLeft()
  78. else
  79. turtle.turnRight()
  80. end
  81. for j = 1, depth do
  82. turtle.digDown()
  83. turtle.down()
  84. end
  85. for j = 1, width do
  86. turtle.dig()
  87. turtle.forward()
  88. end
  89. if length % 2 == 0 then
  90. turtle.turnRight()
  91. else
  92. turtle.turnLeft()
  93. end
  94. turtle.forward()
  95. if length % 2 == 0 then
  96. turtle.turnRight()
  97. else
  98. turtle.turnLeft()
  99. end
  100. for j = 1, width do
  101. turtle.dig()
  102. turtle.forward()
  103. end
  104. if length % 2 == 0 then
  105. turtle.turnLeft()
  106. else
  107. turtle.turnRight()
  108. end
  109. turtle.back()
  110. if length % 2 == 0 then
  111. turtle.turnLeft()
  112. else
  113. turtle.turnRight()
  114. end
  115. for j = 1, depth do
  116. turtle.up()
  117. end
  118. end
  119. end
  120.  
  121. local chunkSize = 16
  122. local width = 16
  123. local length = 16
  124. local depth = 2
  125.  
  126. for i = 1, chunkSize, length do
  127. for j = 1, chunkSize, width do
  128. mineChunk(depth, width, length)
  129. turtle.turnRight()
  130. turtle.forward()
  131. turtle.turnRight()
  132. end
  133. turtle.turnRight()
  134. turtle.forward()
  135. turtle.turnRight()
  136. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement