Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- -- edit this line to adjust the height
- local height = 33
- function Place()
- start = turtle.getSelectedSlot()
- local data = turtle.getItemDetail()
- if data == nil then
- start = start + 1
- turtle.select(start)
- turtle.placeDown()
- elseif data.name ~= "minecraft:cobblestone" then
- start = start + 1
- turtle.select(start)
- turtle.placeDown()
- else
- turtle.placeDown()
- end
- end
- function goDown()
- for i=1, height do
- if turtle.detectDown() then
- turtle.digDown()
- turtle.down()
- else
- turtle.down()
- end
- end
- end
- function goUp()
- for i=1, height do
- if turtle.detectUp() then
- turtle.digUp()
- turtle.up()
- Place()
- else
- turtle.up()
- Place()
- end
- end
- end
- function goForward()
- if turtle.detect() then
- turtle.dig()
- turtle.forward()
- else
- turtle.forward()
- end
- end
- function rowCount()
- for i=1, tonumber(tArgs[1]) do
- goForward()
- goDown()
- goUp()
- end
- end
- rowCount()
- turtle.select(1)
Advertisement
Add Comment
Please, Sign In to add comment