Lorc520

BoneMeal craft and use

May 14th, 2025 (edited)
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. while true do
  2. local empty = true
  3.  
  4. -- Check if slots 1, 2, and 3 are empty
  5. for slot = 1, 3 do
  6. local item = turtle.getItemDetail(slot)
  7. if item then
  8. empty = false
  9. break
  10. end
  11. end
  12.  
  13. if empty then
  14. -- Select slot 1 and pull bones from chest to craft
  15. turtle.select(1)
  16. turtle.turnRight()
  17. turtle.suck(64)
  18. turtle.turnLeft()
  19.  
  20. -- Craft bone meal
  21. turtle.select(1)
  22. turtle.craft()
  23. else
  24. -- Use bone meal from slots 1–3
  25. for slot = 1, 3 do
  26. turtle.select(slot)
  27. local item = turtle.getItemDetail()
  28. if item and item.name == "minecraft:bone_meal" then
  29. while turtle.getItemCount(slot) > 0 do
  30. turtle.place()
  31. sleep(0.1)
  32. end
  33. end
  34. end
  35. end
  36. end
  37.  
Add Comment
Please, Sign In to add comment