Advertisement
CaptainSpaceCat

Vein Miner Placer

Dec 18th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. local tArgs = {...}
  2. length = tArgs[1] or 4
  3. width = tArgs[2] or 4
  4. height = tArgs[3] or 4
  5.  
  6. term.clear()
  7. term.setCursorPos(1, 1)
  8. print("Generating cube...")
  9. print("Upon completion, terminate to stop.")
  10.  
  11. function getItem()
  12. for h = 1, 16 do
  13. turtle.select(h)
  14. if turtle.getItemCount() > 0 then
  15. if h == 16 then
  16. error("no items")
  17. end
  18. break
  19. end
  20. end
  21. end
  22.  
  23. while true do
  24.  
  25. turtle.select(16)
  26. turtle.refuel();
  27. getItem()
  28. for l = 1, height do
  29.  
  30. turtle.up()
  31. for n = 1, width/2 do
  32. turtle.placeDown()
  33. for i = 1, length-1 do
  34.   turtle.forward()
  35.   turtle.placeDown()
  36. end
  37.  
  38. turtle.turnLeft()
  39. turtle.forward()
  40. turtle.turnLeft()
  41.  
  42. turtle.placeDown();
  43. for i = 1, length-1 do
  44.   turtle.forward()
  45.   turtle.placeDown()
  46. end
  47.  
  48. if n < width/2 then
  49. turtle.turnRight()
  50. turtle.forward()
  51. turtle.turnRight()
  52. end
  53.  
  54. end
  55.  
  56. --turtle.turnLeft()
  57. --turtle.turnLeft()
  58. --for i = 1, length-1 do
  59. --  turtle.forward()
  60. --end
  61. turtle.turnLeft()
  62. for i = 1, length-1 do
  63.   turtle.forward()
  64. end
  65. turtle.turnLeft()
  66. end
  67. while not turtle.down() do end
  68. sleep(3)
  69. for v = 1, height-1 do
  70. turtle.down()
  71. end
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement