Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function reset()
- _, blockdata = turtle.inspectDown()
- while blockdata["name"] ~= "minecraft:chest" do
- turtle.down()
- _, blockdata = turtle.inspectDown()
- if blockdata["name"] == "minecraft:chest" then
- break
- end
- turtle.digDown()
- end
- turtle.select(1)
- turtle.dropDown()
- turtle.select(15)
- turtle.suck()
- turtle.place()
- end
- local function fell()
- _, blockdata = turtle.inspect()
- while blockdata["name"] == "minecraft:log" do
- _, blockdata = turtle.inspect()
- if blockdata["name"] ~= "minecraft:log" then
- break
- end
- turtle.dig()
- turtle.digUp()
- turtle.up()
- ran = true
- end
- if ran == true then
- ran = false
- reset()
- end
- end
- local function refuel()
- if turtle.getFuelLevel() < 20 then
- turtle.select(16)
- turtle.refuel()
- end
- end
- if turtle.getFuelLevel() == "unlimited" then
- needsFuel = false
- end
- while true do
- turtle.turnRight()
- fell()
- if needsFuel then
- refuel()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement