Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findMaterial()
- if turtle.getItemCount() > 0 then
- return
- end
- for i = 1, 16, 1 do
- turtle.select(i)
- local count = turtle.getItemCount()
- if count > 0 then
- return
- end
- end
- end
- local length = 0;
- while not turtle.detect() do
- findMaterial()
- turtle.placeDown()
- if turtle.forward() then
- length = length + 1
- end
- end
- for i = 1, length, 1 do
- turtle.back()
- end
Advertisement
Add Comment
Please, Sign In to add comment