SHOW:
|
|
- or go back to the newest paste.
| 1 | sleepTime = 25 | |
| 2 | ||
| 3 | while true do | |
| 4 | turtle.select(1) | |
| 5 | ||
| 6 | - | while redstone.getInput("back") do
|
| 6 | + | while redstone.getInput("front") do
|
| 7 | turtle.suck() | |
| 8 | turtle.suck() | |
| 9 | - | turtle.suckUp(42) |
| 9 | + | |
| 10 | amount = 42 | |
| 11 | itemCount = turtle.getItemCount(3) | |
| 12 | ||
| 13 | - | turtle.dropDown() |
| 13 | + | if itemCount <= amount then |
| 14 | amount = amount - itemCount | |
| 15 | turtle.select(3) | |
| 16 | turtle.suckUp(amount) | |
| 17 | turtle.select(1) | |
| 18 | end | |
| 19 | ||
| 20 | turtle.dropUp() | |
| 21 | turtle.select(2) | |
| 22 | turtle.dropUp(20) | |
| 23 | turtle.dropDown() | |
| 24 | turtle.select(3) | |
| 25 | ||
| 26 | item = turtle.getItemDetail() | |
| 27 | if item and item.name == "minecraft:blaze_powder" then | |
| 28 | turtle.dropDown() | |
| 29 | end | |
| 30 | ||
| 31 | turtle.drop() | |
| 32 | turtle.select(1) | |
| 33 | ||
| 34 | i = 0 | |
| 35 | while i < sleepTime do | |
| 36 | os.setComputerLabel("Sleeping for: "..sleepTime-i.." seconds")
| |
| 37 | i = i + 1 | |
| 38 | sleep(1) | |
| 39 | end | |
| 40 | end | |
| 41 | ||
| 42 | sleep(.1) | |
| 43 | end |