How would I make all amethyst blocks in the world automatically convert blocks next to them?

I want to make an infection datapack and I want amethyst blocks to work like "warding blocks" similar to Sculk Horde. I don't really know how to do this by myself so i thought i could come here to ask for help...

Thanks

Continue to help post