SHOW:
|
|
- or go back to the newest paste.
| 1 | function rotateToRed(side) | |
| 2 | while(redstone.getInput(side)==false)do | |
| 3 | turtle.turnLeft() | |
| 4 | end | |
| 5 | end | |
| 6 | ||
| 7 | function numCraftToSlot(n) | |
| 8 | slot=n | |
| 9 | if(n>3)then slot=slot+1 end | |
| 10 | if(n>6)then slot=slot+1 end | |
| 11 | return slot | |
| 12 | end | |
| 13 | ||
| 14 | function suck(slot,count) | |
| 15 | turtle.select(slot) | |
| 16 | turtle.suck() | |
| 17 | if(turtle.getItemCount(slot)-count>0)then | |
| 18 | turtle.drop(turtle.getItemCount(slot)-count) | |
| 19 | end | |
| 20 | end | |
| 21 | function suckUp(slot,count) | |
| 22 | turtle.select(slot) | |
| 23 | turtle.suckUp() | |
| 24 | if(turtle.getItemCount(slot)-count>0)then | |
| 25 | turtle.dropUp(turtle.getItemCount(slot)-count) | |
| 26 | end | |
| 27 | end | |
| 28 | function suckDown(slot,count) | |
| 29 | turtle.select(slot) | |
| 30 | turtle.suckDown() | |
| 31 | if(turtle.getItemCount(slot)-count>0)then | |
| 32 | turtle.dropDown(turtle.getItemCount(slot)-count) | |
| 33 | end | |
| 34 | end |