Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function baumWeg()
- b, item = turtle.inspect()
- if b and item.name == "minecraft:log" then
- turtle.dig()
- turtle.forward()
- upCnt = 0
- while true do
- b, item = turtle.inspectUp()
- if b and item.name == "minecraft:log" then
- upCnt = upCnt +1
- turtle.digUp()
- turtle.up()
- else
- break
- end
- end
- while upCnt > 0 do
- upCnt = upCnt -1
- turtle.down()
- end
- end
- end
- function findSampling()
- for i=1,16 do
- turtle.select(i)
- item = turtle.getItemDetail(i)
- if item item.name == "minecraft:sapling" then
- return i
- end
- end
- return false
- end
- function main()
- while true do
- b, item = turtle.inspect()
- if b and item.name == "minecraft:log" then
- break
- else
- turtle.forward()
- end
- end
- baumWeg()
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- findSampling()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement