Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slot = 16
- turtle.select(1)
- local go = true
- local function plant()
- if turtle.getItemCount(slot) > 1 then
- turtle.select(slot)
- turtle.place()
- turtle.select(1)
- return true
- end
- return false
- end
- local function done()
- while turtle.down() do end
- turtle.drop()
- end
- local function fell()
- while turtle.dig() do
- turtle.digUp()
- turtle.up()
- end
- done()
- end
- local function check()
- turtle.select(slot)
- local test = turtle.compare()
- turtle.select(1)
- if not test then
- return true
- end
- return false
- end
- while go do
- sleep(10)
- if check() then
- fell()
- go = plant()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement