Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.up()
- turtle.forward()
- local rotateright = true
- local function turn_around()
- if rotateright then
- turtle.turnRight()
- turtle.forward()
- if turtle.detect() then return 1 end
- turtle.turnRight()
- else
- turtle.turnLeft()
- if turtle.detect() then return 1 end
- turtle.forward()
- turtle.turnLeft()
- end
- rotateright = not rotateright
- end
- while true do
- local is,data = turtle.inspectDown()
- local justrotated = false
- if is and data.name == "minecraft:sweet_berry_bush" then
- if data.state.age>=2 then
- turtle.digDown()
- turtle.placeDown()
- end
- end
- if turtle.detect() then
- if turn_around() then break end
- justrotated = true
- elseif not is then
- turtle.back()
- if turn_around() then break end
- justrotated = true
- else
- turtle.forward()
- end
- if justrotated and not turtle.detectDown() then
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment