Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- while true do
- print("waiting for input signal")
- os.pullEvent("redstone")
- if redstone.getInput("right")==true then
- print("milking...")
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(1)
- while turtle.getItemCount(1)==0 do
- redstone.setOutput("top",true)
- sleep(1)
- redstone.setOutput("top",false)
- sleep(1)
- end
- local detail={}
- detail = turtle.getItemDetail(1)
- while detail["name"]~="minecraft:milk_bucket" do
- turtle.place()
- sleep(1)
- detail = turtle.getItemDetail(1)
- end
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment