I am trying to make a tool that will place a node when you use it on a certain node (similar to how buckets used to be), but I would like to be able to dig with it on all other nodes. Looking at the buckets code, I see that was achieved by using pointed_node.above, but it was on_use and on-rightclick - is there any equivalent for register_on_punchnode?
As far as I know and as far as I understand your problem, it is currently not possible to do that. But you can use on_place for right click, so you could still dig with left.
Basically, I need to make a tool. This is just an example, but when you punch default:stone with it, it places default:sand in front of it. However, you can still dig things that aren't default:stone, but on_use doesn't allow this.