Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function forward()
- while true do
- if turtle.forward() then
- break
- else
- for i = 1 , 16 do
- turtle.select(i)
- turtle.suck()
- end
- os.sleep(1)
- turtle.dig()
- end
- end
- end
- function up()
- while true do
- if turtle.up() then
- break
- else
- os.sleep(1)
- turtle.digUp()
- end
- end
- end
- function down()
- while true do
- if turtle.down() then
- break
- else
- turtle.digDown()
- os.sleep(1)
- end
- end
- end
- function fill()
- down()
- while true do
- for i = 1,16 do
- if turtle.getItemDetail(i) then
- if turtle.getItemDetail(i).name == "minecraft:gravel" then
- turtle.select(i)
- end
- end
- end
- if not turtle.detectDown() then
- turtle.placeDown()
- else break
- end
- end
- up()
- end
- function go()
- fill()
- for i = 1,16 do
- if turtle.getItemDetail(i) then
- if turtle.getItemDetail(i).name == "minecraft:dirt" then
- turtle.select(i)
- break
- end
- end
- end
- turtle.digDown()
- turtle.placeDown()
- forward()
- end
- function cycle()
- for i = 1,y do
- go()
- end
- end
- function what()
- print("type how much toward forward")
- x = io.read()
- print("type how much toward right")
- y = io.read()
- end
- -------
- what()
- for i = 1,x do
- cycle()
- turtle.turnRight()
- go()
- turtle.turnRight()
- cycle()
- turtle.turnLeft()
- go()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement