SHOW:
|
|
- or go back to the newest paste.
| 1 | for i=1,16 do | |
| 2 | turtle.select(i) | |
| 3 | turtle.dropDown() | |
| 4 | end | |
| 5 | - | print("crafting...")
|
| 5 | + | |
| 6 | print("waiting for input signal")
| |
| 7 | os.pullEvent("redstone")
| |
| 8 | if redstone.getInput("right")==true then
| |
| 9 | print("milking...")
| |
| 10 | for i=1,16 do | |
| 11 | turtle.select(i) | |
| 12 | turtle.dropDown() | |
| 13 | end | |
| 14 | turtle.select(1) | |
| 15 | while turtle.getItemCount(1)==0 do | |
| 16 | redstone.setOutput("top",true)
| |
| 17 | - | turtle.select(16) |
| 17 | + | |
| 18 | - | turtle.craft() |
| 18 | + | |
| 19 | sleep(1) | |
| 20 | end | |
| 21 | local detail={}
| |
| 22 | detail = turtle.getItemDetail(1) | |
| 23 | while detail["name"]~="minecraft:milk_bucket" do | |
| 24 | turtle.place() | |
| 25 | sleep(1) | |
| 26 | detail = turtle.getItemDetail(1) | |
| 27 | end | |
| 28 | for i=1,16 do | |
| 29 | turtle.select(i) | |
| 30 | turtle.dropDown() | |
| 31 | end | |
| 32 | end | |
| 33 | end |