SHOW:
|
|
- or go back to the newest paste.
| 1 | - | function start() |
| 1 | + | |
| 2 | - | while(turtle.detect() == false) |
| 2 | + | |
| 3 | - | do |
| 3 | + | |
| 4 | - | turtle.forward() |
| 4 | + | |
| 5 | if (tag['name'] == "minecraft:bamboo") | |
| 6 | then | |
| 7 | turtle.dig() | |
| 8 | turtle.suckDown() | |
| 9 | end | |
| 10 | end | |
| 11 | - | if(tag['tags']['minecraft:crops'] == true) |
| 11 | + | |
| 12 | function move() | |
| 13 | - | while (tag['state']['age'] <= 6) |
| 13 | + | if(turtle.detect()) |
| 14 | - | do |
| 14 | + | |
| 15 | - | sleep(2) |
| 15 | + | |
| 16 | - | block, tag = turtle.inspect() |
| 16 | + | else |
| 17 | turtle.forward() | |
| 18 | end | |
| 19 | - | turtle.place() |
| 19 | + | |
| 20 | - | else |
| 20 | + | function checkChests() |
| 21 | - | turtle.turnLeft() |
| 21 | + | |
| 22 | block, tag = turtle.inspect() | |
| 23 | - | else |
| 23 | + | |
| 24 | - | turtle.place() |
| 24 | + | |
| 25 | if(tag['tags']['forge:chests'] == true) | |
| 26 | then | |
| 27 | if(turtle.getItemCount() >= 15) | |
| 28 | then | |
| 29 | turtle.drop(1) | |
| 30 | end | |
| 31 | end | |
| 32 | end | |
| 33 | turtle.turnLeft() | |
| 34 | - | if(tag['state']['type'] == "single") |
| 34 | + | |
| 35 | function checkFuel() | |
| 36 | - | turtle.select(16) |
| 36 | + | |
| 37 | - | if(turtle.getItemCount() <= 16) |
| 37 | + | |
| 38 | - | then |
| 38 | + | |
| 39 | - | turtle.suck(16) |
| 39 | + | |
| 40 | - | end |
| 40 | + | |
| 41 | - | turtle.select(1) |
| 41 | + | |
| 42 | - | else |
| 42 | + | |
| 43 | - | if(turtle.getItemCount() >= 20) |
| 43 | + | |
| 44 | - | then |
| 44 | + | |
| 45 | - | turtle.drop(16) |
| 45 | + | checkChests() |
| 46 | - | turtle.select(2) |
| 46 | + | |
| 47 | - | if(turtle.getItemCount() >= 1) |
| 47 | + | sleep(10) |
| 48 | - | then |
| 48 | + |