Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Press CTRL+T to stop")
- local turtle_inventory_slot = 1
- local selected_item_details = turtle.getItemDetail(turtle_inventory_slot)
- local inventory_details = 1
- local open_inventory_slot = 1
- --Sort inventory of turtle
- while turtle_inventory_slot <= 16 do
- turtle.select(turtle_inventory_slot)
- selected_item_details = turtle.getItemDetail(turtle_inventory_slot)
- if selected_item_details ~= nil then
- if selected_item_details.name ~= "minecraft:netherrack" then
- turtle.dropUp()
- else --Space has correct item in it
- turtle.transferTo(open_inventory_slot)
- open_inventory_slot = open_inventory_slot + 1
- end
- end
- turtle_inventory_slot = turtle_inventory_slot + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment