Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mineChunk(depth, width, length)
- for i = 1, depth do
- for j = 1, width do
- turtle.dig()
- turtle.forward()
- end
- if i % 2 == 0 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- for j = 1, width do
- turtle.dig()
- turtle.forward()
- end
- if i % 2 == 0 then
- turtle.turnLeft()
- turtle.back()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.back()
- turtle.turnRight()
- end
- turtle.digDown()
- turtle.down()
- end
- for i = 1, width do
- turtle.dig()
- turtle.forward()
- end
- if length % 2 == 0 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- turtle.forward()
- if length % 2 == 0 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- for i = 1, width do
- turtle.dig()
- turtle.forward()
- end
- if length % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- turtle.back()
- if length % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- for i = 1, depth do
- turtle.up()
- end
- for i = 1, length - 1 do
- if length % 2 == 0 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- turtle.forward()
- if length % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- for j = 1, depth do
- turtle.digDown()
- turtle.down()
- end
- for j = 1, width do
- turtle.dig()
- turtle.forward()
- end
- if length % 2 == 0 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- turtle.forward()
- if length % 2 == 0 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- for j = 1, width do
- turtle.dig()
- turtle.forward()
- end
- if length % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- turtle.back()
- if length % 2 == 0 then
- turtle.turnLeft()
- else
- turtle.turnRight()
- end
- for j = 1, depth do
- turtle.up()
- end
- end
- end
- local chunkSize = 16
- local width = 16
- local length = 16
- local depth = 2
- for i = 1, chunkSize, length do
- for j = 1, chunkSize, width do
- mineChunk(depth, width, length)
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement