Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("Libraries/Inventory")
- require("Libraries/Tables")
- require("Libraries/Fuel")
- function DigUp(h)
- print("DigUp")
- local count = 0
- local s, b = turtle.inspectUp()
- while count < h and s do
- turtle.digUp()
- turtle.up()
- s, b = turtle.inspectUp()
- count = count + 1
- end
- while count > 0 do
- turtle.digDown()
- turtle.down()
- count = count - 1
- end
- end
- function DigTree() do
- print("Digging Tree")
- local count = 0
- local s = true
- turtle.dig()
- turtle.forward()
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- while s do
- s, b = turtle.inspectUp()
- if (s and (b.name == "minecraft:oak_log")) then
- turtle.digUp()
- turtle.up()
- count = count+1
- else
- s = false
- end
- end
- while count > 0 do
- turtle.digDown()
- turtle.down()
- count = count-1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement