Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Digs block in front, then block above, then moves up. Moves back down when finished
- local function column()
- while turtle.detectUp() do
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- turtle.dig()
- while not turtle.detectDown() do
- turtle.down()
- end
- end
- --Picks up items on ground
- local function suck()
- turtle.suck()
- end
- --Cuts the tree down, column by column
- local function fell()
- turtle.dig()
- turtle.forward()
- column()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- column()
- end
- --Replants the tee and fills the chest with it's inventory
- local function replant()
- turtle.select(15)
- suck()
- turtle.place()
- turtle.turnLeft()
- suck()
- turtle.forward()
- suck()
- turtle.turnRight()
- suck()
- turtle.place()
- turtle.turnRight()
- suck()
- turtle.place()
- turtle.turnRight()
- suck()
- turtle.forward()
- for slot=2,7 do
- turtle.select(slot)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(15)
- turtle.place()
- turtle.select(1)
- while not turtle.compare() do
- turtle.select(16)
- turtle.place()
- turtle.select(1)
- end
- end
- --Executes until told to stop
- while true do
- fell()
- replant()
- end
Advertisement
Add Comment
Please, Sign In to add comment