Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 0
- function detect()
- if turtle.detect() == true then
- turtle.turnRight()
- if turtle.detect() == true then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.turnRight()
- turtle.place()
- turtle.turnRight()
- end
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- if turtle.detect() == true then
- turtle.turnRight()
- end
- end
- end
- function detectIsland()
- if turtle.detect() == false then
- turtle.forward()
- a = a + 1
- if turtle.detect() == true then
- turtle.turnRight()
- if turtle.detect() == true then
- turtle.turnLeft()
- turtle.back()
- a = a - 1
- turtle.place()
- turtle.turnRight()
- else
- turtle.turnRight()
- turtle.place()
- turtle.turnLeft()
- turtle.forward()
- a = a + 1
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- end
- else
- turtle.turnRight()
- if turtle.detect() == true then
- turtle.turnLeft()
- while turtle.detect() == false do
- turtle.forward()
- a = a + 1
- end
- end
- turtle.turnLeft()
- turtle.turnRight()
- if turtle.detect() == true then
- turtle.turnLeft()
- for i = 1,a do
- turtle.back()
- turtle.place()
- end
- turtle.turnRight()
- end
- turtle.turnLeft()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- if turtle.getItemCount(1) ~= 0 then
- while turtle.getItemCount(1) ~= 0 do
- detect()
- detect()
- turtle.turnLeft()
- detectIsland()
- if turtle.detect() == true then
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement