Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function find()
- for i = 1, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- return
- end
- end
- error("No Items.", 0)
- end
- local i = 0
- while true do
- if not turtle.back() then
- turtle.turnRight()
- i = i + 1
- if i >= 2 then
- turtle.up()
- find()
- turtle.placeDown()
- repeat until not turtle.back()
- turtle.turnRight()
- repeat until not turtle.back()
- turtle.turnRight()
- turtle.back()
- end
- else
- i = 0
- end
- find()
- turtle.place()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement