Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function forward()
- while not turtle.forward() do
- turtle.dig()
- turtle.attack()
- end
- end
- function downward()
- while not turtle.down() do
- turtle.digDown()
- turtle.attackDown()
- end
- end
- function upward()
- while not turtle.up() do
- turtle.digUp()
- turtle.attackUp()
- end
- end
- function selectItem(item)
- for i=1, 16 do
- local d = turtle.getItemDetail(i)
- if d ~= nil then
- if d.name == "minecraft:"..item then
- turtle.select(i)
- return true
- end
- end
- end
- return false
- end
- function isLog(s,d)
- if s then
- if d.name == "minecraft:log" and d.damage == 15 then
- return true
- end
- end
- return false
- end
- function farmWood()
- if isBlock(turtle.inspect()) then
- forward()
- while isLog(turtle.inspectUp()) do
- upward()
- end
- while turtle.down() do end
- turtle.back()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement