Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function plant()
- turtle.select(1)
- local success, sapling = turtle.getItemDetail(1)
- inventory = {}
- if (turtle.getItemCount() <= 1) then
- for i = 3,16 do
- if (turtle.getItemDetail(i).name == sapling.name) then
- turtle.select(i)
- turtle.transferTo(1)
- end
- end
- elseif (turtle.detect() == false) then
- turtle.place()
- end
- end
- plant()
Advertisement
Add Comment
Please, Sign In to add comment