Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local seedsReady = false
- local function checkForSeeds()
- local itemsFound = 0
- for i = 1, 12 do
- itemsFound = itemsFound + turtle.getItemCount(i)
- end
- if itemsFound > 0 then
- seedsReady = true
- else
- seedsReady = false
- end
- end
- local function checkSeedStatus()
- turtle.suckDown()
- for i = 1, 12 do
- turtle.select(i)
- for j = 13, 16 do
- if turtle.compareTo(j) then turtle.dropUp() end
- end
- end
- end
- while true do
- checkForSeeds()
- if seedsReady then
- redstone.setOutput("front", true)
- for i = 1, 12 do
- turtle.select(i)
- turtle.dropDown()
- end
- os.sleep(15)
- checkSeedStatus()
- else
- redstone.setOutput("front", false)
- os.sleep(6)
- checkSeedStatus()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement