Registering blocks is done from your main mod class, or a ModBlocks class method invoked from the main mod class during preInit.
Block myBlock = new CustomBlock();
string registryname = "my_block";
block.setRegistryName(registryname);
block.setUnlocalizedName(block.getRegistryName().toString());
GameRegistry.register(block);
There is an important reason to use block.setUnlocalizedName(block.getRegistryName().toString());
as well! It insures that your block (and item) unlocalized names contain the mod ID to avoid language file conflicts between mods.
Oh you want an item version too so it can exist in your inventory too? That's created separately post 1.7.10 and done like so:
ItemBlock ib = new ItemBlock(block);
ib.setRegistryName(registryname);
GameRegistry.register(ib);
Notice that we set the ItemBlock's registry name to the same string as our block. This is how Forge and match blocks to their ItemBlock counterpart and vice versa.
But wait, there's more!
Your block might have an item form, but that item doesn't have a model or texture yet! Models are automatically registered for blocks, but not items. This may only be called from the Client Proxy and does not cover blocks with variants (such as wool or leaves).
ModelLoader.setCustomModelResourceLocation(
ib , 0, new ModelResourceLocation(ib.getRegistryName(),"normal"));
Generally speaking you will not also need an Item Model JSON as Forge and vanilla will fall back on the block's model instead, however this is not always the case. If you do find that you need an Item model JSON, just parent it to your block JSON and save it to src\main\resources\assets\example\models\item\
with the same file name as the block's registry name.
{
"parent": "example:block/my_block"
}