Probably all over github. But it is as simple as draco said. You should already have a registry event if you are using a modern version. So step one complete. Step two is to only call new BlahItem in the Item Registry Event, and likewise for Blocks. Then you need to register those items and blocks in the event.
Now if you need to have access to those values use the ObjectHolder annotation.