How to detect a certain tool being used on a block type
I am currently trying to create a salvaging mechanic for my modpack where players use shears to salvage various materials from blocks making up a ship. I want it to be similar to those mods that allow you to click dirt for pebbles, but I cannot find a way to detect a player using a particular tool on a block type. I know there is something similar in minecraft's code as axes can change logs into stripped logs and change the states of copper, if anyone knows how to add a property like this it would be appreciated.