Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function IsChest()
- success, data = turtle.inspect()
- if not success then
- return false
- end
- if data.name == "minecraft:chest" then
- return true
- end
- return false
- end
- function dropoff()
- for n=1,16 do
- local nCount = turtle.getItemCount(n)
- if nCount > 0 then
- turtle.select(n)
- turtle.drop()
- end
- end
- end
- while true do
- if turtle.forward() then
- if turtle.detectDown() then
- turtle.digDown()
- end
- else
- if IsChest() then
- dropoff()
- end
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement