Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local drop = turtle.drop
- --local signal = true
- local function toggle(onOff)
- -- signal = not signal
- rs.setOutput("bottom",onOff)
- end
- local function searchSeed()
- local item = nil
- for i=1,16 do
- item = turtle.getItemDetail(i)
- if item and item.name == "minecraft:wheat_seeds" then return true end
- if not item then return false end
- end
- return false
- end
- local function checkNWait()
- while not searchSeed() do
- local event = os.pullEvent("turtle_inventory")
- end
- return searchSeed()
- end
- local function dropIngredients()
- local i = 1
- local done = false
- local item = nil
- while i < 17 and turtle.getItemCount(i) > 0 and not done do
- turtle.select(i)
- item = turtle.getItemDetail(i)
- if item and item.name == "minecraft:wheat_seeds" then done = true end
- turtle.drop(1)
- i = i + 1
- end
- end
- toggle(true)
- while true do
- print("Insert seeds as _last_ ingredient")
- checkNWait()
- dropIngredients()
- sleep(0.5)
- toggle(false)
- sleep(5)
- toggle(true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement