Advertisement
HarvDad

boner

May 17th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. -- boner: Apply bonemeal to sapling
  2.  
  3.  
  4. boneSlot = 16
  5. saplingSlot = 1
  6. minimum = 64
  7. boneTrys = 6
  8.  
  9. while true do
  10. attempts = 0
  11. sleep(2)
  12. turtle.turnLeft()
  13. if turtle.getItemCount(saplingSlot) < minimum then
  14. turtle.suckDown()
  15. end
  16. turtle.select(saplingSlot)
  17.  
  18. if turtle.compare() then
  19. if turtle.getItemCount(boneSlot) > 0 then
  20. turtle.select(boneSlot)
  21. for i=1,boneTrys do
  22. if turtle.getItemCount(boneSlot) > 0 then
  23. turtle.place()
  24. else
  25. break
  26. end
  27. end
  28. end
  29. else
  30. if not turtle.detect() then
  31. turtle.select(saplingSlot)
  32. turtle.place()
  33. sleep(1)
  34. end
  35. end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement