turn targetted block into CAKE
making a lil datapack for a friend's birthday and my idea was to have an item turn whatever block they're looking at into cake. ive already got a system set up that runs the function when they switch a certain item into their offhand. it returns it back into their mainhand and runs a function. now, how would i get the player's targeted block? do i need to do something like a raycast system for something so small or is there a much easier way?