Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findGravelInSlot()
- for i = 1, 16 do
- local item = turtle.getItemDetail(i)
- if item ~= nil and item.name == "minecraft:gravel" then
- return i
- end
- end
- return 1
- end
- function detectGravel()
- if turtle.detect() then
- local success, block = turtle.inspect()
- if success and block.name == "minecraft:gravel" then
- return true
- end
- else
- return false
- end
- end
- while true do
- turtle.suck()
- if detectGravel() then
- turtle.dig()
- else
- turtle.select(findGravelInSlot())
- turtle.place()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement