Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function forward()
- while not turtle.forward() do
- turtle.dig()
- end
- end
- target="minecraft:dirt"
- target2="minecraft:grass_block"
- lw=8 -- length and width, It'll just be a box
- local function digUp()
- local has_block, data = turtle.inspectUp()
- if has_block then
- if data.name == target or data.name == target2 then
- turtle.digUp()
- else
- print("Target=",data.name)
- end
- end
- end
- function digDown()
- local has_block, data = turtle.inspectDown()
- if has_block then
- if data.name == target or data.name == target2 then
- turtle.digDown()
- else
- print("Target=",data.name)
- end
- end
- end
- flip=0
- depth=3
- function flipper(f)
- if f==0 then
- turtle.turnRight()
- forward()
- turtle.turnRight()
- f=1
- else
- turtle.turnLeft()
- f=0
- forward()
- turtle.turnLeft()
- end
- return f
- end
- for z=1,depth do
- for x=1,lw do
- for y=1,lw do
- digUp()
- digDown()
- forward()
- end
- flip=flipper(flip)
- forward()
- end
- -- flip=flipper(flip)
- if flip==0 then
- flip=1
- else
- flip=0
- end
- for x=1,3 do
- turtle.digDown()
- turtle.down()
- end
- end
- for x=1,(3*depth) do
- while not turtle.up() do
- turtle.digUp()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement