Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("put an enderchest to the right of the tree")
- print("slot 12 = bonemeal")
- print("slot 13-16 = sapling")
- print("type in anything and press enter to start")
- io.read()
- height = 0
- function plant()
- slot = 13
- turtle.select(slot)
- while not turtle.place() do
- if slot > 17 then
- error()
- end
- turtle.select(slot)
- slot = slot + 1
- end
- end
- function grow()
- plant()
- turtle.back()
- plant()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- plant()
- turtle.back()
- plant()
- turtle.select(12)
- turtle.place()
- turtle.select(1)
- end
- function chop()
- turtle.dig()
- turtle.forward()
- while turtle.digUp() do
- turtle.dig()
- turtle.up()
- height = height + 1
- end
- turtle.dig()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- for x=1, height do
- turtle.dig()
- turtle.digDown()
- turtle.down()
- end
- turtle.dig()
- print("This tree was ".. height .." blocks tall!")
- height = 0
- end
- function dropOff()
- turtle.turnRight()
- slot = 1
- for x=1, 11 do
- turtle.select(slot)
- turtle.drop()
- slot = slot + 1
- end
- slot = 1
- turtle.turnLeft()
- end
- function sleeping()
- nap = 12
- for x=1, 11 do
- if nap < 10 then
- print("Waking up in ".. nap .."min")
- sleep(60)
- nap = nap - 1
- else
- print("Waking up in ".. nap .."min")
- sleep(60)
- nap = nap - 1
- end
- end
- print("Time to get to work!")
- end
- while turtle.getItemCount(12) > 0 and (turtle.getItemCount(13) + turtle.getItemCount(14) + turtle.getItemCount(15) + turtle.getItemCount(16)) > 3 and turtle.getFuelLevel() > 150 do
- grow()
- chop()
- dropOff()
- sleeping()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement