Execute on right click

How do i execute a command when i right click on a fungus on a stick? i've been trying for a while and i have no idea how

Continue to help post