How to use items to select blocks.
I am making a parkour datapack to do parkour courses with friends. I currently have a datapack that starts a timer when you leave a green terracotta block and stops it when you get on a red one. However I want to add split times in the middle and not have to remove parts of the map.
How do I set up certain items like blaze rods or feather, so that when I right or left click with them on a block it spawns a marker entity in the middle of the block? I just need help with that and I should be able to figure out everything else myself.