Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local selectedSlot = 1
- local first = true
- while true do
- if not first then
- local forward = turtle.detect()
- local down = turtle.detectDown()
- if turtle.getItemCount(selectedSlot) == 0 then
- selectedSlot = selectedSlot + 1
- end
- if down then
- turtle.back()
- turtle.turnRight()
- turtle.forward()
- end
- elseif forward then turtle.turnRight()
- elseif not forward and not down then
- turtle.placeDown()
- turtle.forward()
- end
- else first = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment