You shouldn't use IDs, as those may not be the same every time you use them. You should either store a Block/IBlockState instance, and save the registry key/metadata to NBT when you need to. Why did you want to use IDs over anything else in the first place?