Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Make a tunnel
- function MiningTurtle.tunnel( length, height, width )
- width = width or 1
- height = height or 2
- -- Length loop
- for i = 1,length do
- MiningTurtle.saveForward()
- if i % 2 == 0 then
- -- even
- turtle.turnLeft()
- for x = 0,width do
- for y = 0,height do
- if x % 2 == 0 then
- MiningTurtle.saveUp()
- else
- MiningTurtle.saveDown()
- end
- end
- if x < width then
- MiningTurtle.saveForward()
- end
- end
- turtle.turnRight()
- else
- -- odd
- turtle.turnRight()
- for x = 0,width do
- for y = 0,height do
- if x % 2 == 0 then
- MiningTurtle.saveUp()
- else
- MiningTurtle.saveDown()
- end
- end
- if x < width then
- MiningTurtle.saveForward()
- end
- end
- turtle.turnLeft()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement