Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Version 1.0]]--
- function fuelCheck()
- local fuelLevel = turtle.getFuelLevel()
- if fuelLevel < 16 then
- turtle.select(1)
- turtle.refuel(1)
- print("Refueled!")
- end
- end
- function chopTree()
- local success, data = turtle.inspect()
- if data.name == "minecraft:log" then
- print("Tree detected.")
- turtle.dig()
- turtle.forward()
- turtle.digDown()
- turtle.select(3)
- turtle.place()
- turtle.select(1)
- while turtle.detectUp() == true do
- turtle.digUp()
- turtle.up()
- end
- while turtle.detectDown() == false do
- turtle.down()
- end
- end
- end
- local chopping = true
- while chopping do
- fuelCheck()
- chopTree()
- turtle.forward()
- turtle.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement