Add autopotato.lua
This commit is contained in:
commit
f5d00dc993
1 changed files with 36 additions and 0 deletions
36
autopotato.lua
Normal file
36
autopotato.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
potatos = peripheral.wrap("left")
|
||||
bone_meal = peripheral.wrap("right")
|
||||
|
||||
while true do
|
||||
exists, block = turtle.inspect("front")
|
||||
if not exists then
|
||||
turtle.turnRight()
|
||||
turtle.suck()
|
||||
turtle.turnLeft()
|
||||
turtle.place()
|
||||
turtle.turnRight()
|
||||
turtle.drop()
|
||||
turtle.turnLeft()
|
||||
else
|
||||
if block.state["age"] == 7 then
|
||||
turtle.dig()
|
||||
turtle.suck()
|
||||
turtle.turnRight()
|
||||
turtle.drop()
|
||||
turtle.turnLeft()
|
||||
sleep(.5)
|
||||
else
|
||||
turtle.turnLeft()
|
||||
turtle.suck()
|
||||
turtle.turnRight()
|
||||
turtle.place()
|
||||
turtle.place()
|
||||
turtle.place()
|
||||
turtle.turnLeft()
|
||||
turtle.drop()
|
||||
turtle.turnRight()
|
||||
end
|
||||
end
|
||||
sleep(.5)
|
||||
end
|
||||
l
|
||||
Loading…
Add table
Add a link
Reference in a new issue