SHOW:
|
|
- or go back to the newest paste.
| 1 | chestFull = false | |
| 2 | ||
| 3 | function fillSlots(start, finish) | |
| 4 | for i=start,finish do | |
| 5 | turtle.select(i) | |
| 6 | while turtle.getItemCount() < 64 do | |
| 7 | - | turtle.suck(64-turtle.getItemCount()) |
| 7 | + | turtle.suckUp(64-turtle.getItemCount()) |
| 8 | end | |
| 9 | end | |
| 10 | end | |
| 11 | ||
| 12 | function emptyInventory() | |
| 13 | for i=1,16 do | |
| 14 | turtle.select(i) | |
| 15 | item = turtle.getItemDetail() | |
| 16 | - | if item and item.name == "ic2:itemmisc" and item.damage == 451 then |
| 16 | + | if item and item.name == "ic2:blockmachinelv" then |
| 17 | dropped, message = turtle.dropDown() | |
| 18 | ||
| 19 | if not dropped then | |
| 20 | chestFull = true | |
| 21 | return | |
| 22 | else | |
| 23 | chestFull = false | |
| 24 | end | |
| 25 | end | |
| 26 | end | |
| 27 | end | |
| 28 | ||
| 29 | - | function craftCircuit() |
| 29 | + | function craftMachineBlock() |
| 30 | - | turtle.turnLeft() |
| 30 | + | |
| 31 | fillSlots(5, 5) | |
| 32 | - | fillSlots(9, 11) |
| 32 | + | fillSlots(7, 7) |
| 33 | - | |
| 33 | + | fillSlots(9, 11) |
| 34 | - | turtle.turnRight() |
| 34 | + | |
| 35 | - | |
| 35 | + | |
| 36 | - | fillSlots(6,6) |
| 36 | + | |
| 37 | - | |
| 37 | + | |
| 38 | - | turtle.turnRight() |
| 38 | + | |
| 39 | while redstone.getInput("back") and not chestFull do
| |
| 40 | emptyInventory() | |
| 41 | - | fillSlots(7, 7) |
| 41 | + | |
| 42 | - | |
| 42 | + | craftMachineBlock() |
| 43 | - | turtle.turnLeft() |
| 43 | + | |
| 44 | end | |
| 45 | sleep(1) | |
| 46 | end |