Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cut = 0
- while true do
- turtle.suck()
- turtle.turnRight()
- local ok,block = turtle.inspect()
- if ok and block and block.name:match("log") then
- turtle.select(2)
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- if turtle.getFuelLevel()<900 then
- turtle.refuel()
- end
- turtle.up()
- end
- while turtle.down() do
- end
- turtle.back()
- for i = 1, 16 do
- local item = turtle.getItemDetail(i)
- if item and not item.name:match("sapling") then
- turtle.select(i)
- turtle.dropUp()
- end
- end
- --[[turtle.select(1)
- turtle.place()]]
- if cut == 0 then
- cut = 180
- end
- elseif not ok then
- turtle.select(1)
- local item = turtle.getItemDetail()
- if item and item.name:match("sapling") then
- turtle.place()
- else
- for i = 1, 16 do
- turtle.select(i)
- local item = turtle.getItemDetail()
- if item and item.name:match("sapling") then
- turtle.transferTo(1)
- turtle.select(1)
- turtle.place()
- break
- end
- end
- end
- end
- if cut > 0 and turtle.getItemCount(1) < 32 then
- cut = cut-1
- if cut == 0 then
- turtle.down()
- turtle.suckDown()
- turtle.up()
- end
- if cut%20==0 then
- print(cut)
- end
- end
- --[[ if turtle.getFuelLevel() < 1000 then
- turtle.select(2)
- turtle.suckUp()
- turtle.select(1)
- turtle.dropUp()
- turtle.craft()
- for i = 1, 16 do
- turtle.select(i)
- turtle.refuel()
- end
- turtle.select(1)
- turtle.suckUp()
- end ]]
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement