Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function attemptCraft()
- turtle.suck(3)
- local item = turtle.getItemDetail()
- if item ~= nil then
- if item["name"] == "minecraft:wheat" and item["count"] == 3 then
- turtle.select(1)
- turtle.transferTo(2, 1)
- turtle.transferTo(3, 1)
- turtle.craft()
- return true, nil
- end
- end
- return false, item
- end
- function main()
- local cooldown = 0
- while true do
- if cooldown <= 0 then
- local success, item = attemptCraft()
- if success == true then
- turtle.select(1)
- turtle.dropDown()
- else
- if item ~= nil then
- turtle.drop(item["count"])
- end
- cooldown = 250000
- end
- else
- cooldown = cooldown - 1
- end
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement