Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1.  
  2.  
  3. function baumWeg()
  4. b, item = turtle.inspect()
  5. if b and item.name == "minecraft:log" then
  6. turtle.dig()
  7. turtle.forward()
  8. upCnt = 0
  9. while true do
  10. b, item = turtle.inspectUp()
  11. if b and item.name == "minecraft:log" then
  12. upCnt = upCnt +1
  13. turtle.digUp()
  14. turtle.up()
  15. else
  16. break
  17. end
  18. end
  19. while upCnt > 0 do
  20. upCnt = upCnt -1
  21. turtle.down()
  22. end
  23. end
  24. end
  25.  
  26. function findSampling()
  27. for i=1,16 do
  28. turtle.select(i)
  29. item = turtle.getItemDetail(i)
  30. if item item.name == "minecraft:sapling" then
  31. return i
  32. end
  33. end
  34. return false
  35. end
  36.  
  37. function main()
  38. while true do
  39. b, item = turtle.inspect()
  40. if b and item.name == "minecraft:log" then
  41. break
  42. else
  43. turtle.forward()
  44. end
  45. end
  46. baumWeg()
  47. turtle.forward()
  48. turtle.turnLeft()
  49. turtle.turnLeft()
  50. findSampling()
  51. turtle.place()
  52. turtle.turnLeft()
  53. turtle.turnLeft()
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement