Made registerSubBlocks public and added a check.