Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- g,info = turtle.inspect()
- check,off = turtle.inspectDown()
- --print("Got")
- if (check ~=true) and (info["name"]~="minecraft:log") then
- onground = false
- suck = true;
- while (suck) do
- check,off = turtle.inspectDown()
- if (off["name"]=="minecraft:dirt") then
- suck = false;
- end
- if (off["name"]=="minecraft:grass") then
- suck = false;
- end
- turtle.down()
- -- print("Gotodown")
- end
- elseif (info["name"]~="minecraft:log") or (off == "minecraft:grass") or (off=="minecraft:dirt") then
- turtle.select(12)
- turtle.place()
- end
- if (g==true) then
- if (info["name"] == "minecraft:log") then
- print("Found log!")
- flag = false
- if (turtle.getFuelLevel()<10) then
- turtle.select(4)
- turtle.refuel()
- end
- if (turtle.getFuelLevel()<10) then
- error("Not enough fuel! Please use fourth slot!")
- else
- --here
- turtle.select(8)
- local _,wood = turtle.inspect()
- local _,leave = turtle.inspectUp()
- if (wood["name"] == "minecraft:log") then
- if (leave["name"]=="minecraft:leaves") then
- turtle.digUp(); -- dig leaves above
- else
- turtle.digUp();
- end
- turtle.dig(); -- dig log in front of
- turtle.turnRight()
- turtle.dig(); -- dig log in front of
- turtle.turnRight()
- turtle.dig(); -- dig log in front of
- turtle.turnRight()
- turtle.dig(); -- dig log in front of
- turtle.turnRight()
- turtle.up();
- else
- gg,hh = turtle.inspectDown()
- if (hh["name"] == "minecraft:dirt") or (hh["name"] == "minecraft:grass") then
- turtle.select(12)
- turtle.place()
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement