So I am facing some trouble, whereby if item x is struck by lightning the item transforms into another. Basically the item is destroyed and the other item to be transformed into takes its place. I also want to do this with two items, say item a and item b are together and if they are struck by lightning (they are in the same position) they transform into another item. I have managed to do this with blocks, but only through the means of a rod, whereby on right click it summons lightning and through that code it checks if the block struck at the position is what I want it then it transforms it. But I want the block or item itself to check if it has been struck by lightning then transform. That way any lightning bolt from any source can transform it.
Thanks for your support