Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local empty = true
- -- Check if slots 1, 2, and 3 are empty
- for slot = 1, 3 do
- local item = turtle.getItemDetail(slot)
- if item then
- empty = false
- break
- end
- end
- if empty then
- -- Select slot 1 and pull bones from chest to craft
- turtle.select(1)
- turtle.turnRight()
- turtle.suck(64)
- turtle.turnLeft()
- -- Craft bone meal
- turtle.select(1)
- turtle.craft()
- else
- -- Use bone meal from slots 1–3
- for slot = 1, 3 do
- turtle.select(slot)
- local item = turtle.getItemDetail()
- if item and item.name == "minecraft:bone_meal" then
- while turtle.getItemCount(slot) > 0 do
- turtle.place()
- sleep(0.1)
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment