Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Wood Lite
- -- Modfied from original AutoWood from
- -- SethBling by einarjh, then again
- -- modified by hildenae
- -- Original: a3pRQxZ2, ZYuqX2bS
- fuel=1
- -- where to pick fuel
- sapling=2
- -- where to pick saplings for planting
- bonemeal=3
- -- where to pick bonemeal
- -- if 0, will not use bonemeal
- -- then slot 3 can have storage
- storageStart=4
- -- first storageslot
- storageStop=16
- -- last storageslot
- fuelCount=10
- -- how much fuel to pick when refilling
- local function checkFuel()
- if turtle.getFuelLevel() < 20 then
- turtle.select(fuel)
- turtle.refuel(fuelCount)
- end
- end
- local function column()
- local height = 0
- while turtle.digUp() do
- turtle.dig()
- checkFuel()
- turtle.up()
- height = height + 1
- end
- turtle.dig()
- checkFuel()
- return height
- end
- local function columnDown(height)
- for i=1,height do
- checkFuel()
- turtle.dig()
- turtle.digDown()
- turtle.down()
- end
- turtle.dig()
- end
- local function digmove()
- checkFuel()
- turtle.dig()
- turtle.forward()
- end
- local function fell()
- digmove()
- local height = column()
- turtle.turnRight()
- digmove()
- turtle.turnLeft()
- columnDown(height)
- end
- local function useBoneMeal()
- if bonemeal > 0 then
- turtle.select(bonemeal)
- turtle.place()
- end
- end
- local waitForBlock()
- useBoneMeal()
- turtle.select(sapling)
- while turtle.compare()
- write ("Sapling (slot ")
- write(sapling)
- print(") has not grown")
- print("Sleeping (60)")
- checkFuel()
- os.sleep(60)
- end
- end
- local dropInventory()
- for slot=storageStart,storageStop do
- turtle.select(slot)
- turtle.drop()
- end
- end
- local function replant()
- turtle.select(sapling)
- turtle.suck()
- turtle.place()
- turtle.turnLeft()
- turtle.suck()
- turtle.forward()
- turtle.suck()
- turtle.turnRight()
- turtle.suck()
- turtle.place()
- turtle.turnRight()
- turtle.suck()
- turtle.place()
- turtle.turnRight()
- turtle.suck()
- turtle.forward()
- turtle.suck()
- dropInventory()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(sapling)
- turtle.place()
- waitForBlock()
- end
- while true do
- fell()
- replant()
- end
Advertisement
Add Comment
Please, Sign In to add comment