Pro-tip: The initialization of the field is done so the java compiler does not complain, but it is set by FML in the run-time.
FML is smart to the point, maybe the user does not want to code the names of the blocks or items, to be the same names?
Well in this case, we can have the class level annotation defining the modid as previously discussed, but also having the field level annotation, show the identifier for the block.
As you can see here, it can be hugely dynamic, and it even keeps up to date for any aliases3 that are placed on any blocks or items in the GameRegistry for Minecraft
Most mod APIs supply a method of linking to their Blocks and items, but it is commonly said, in the JVM, reflection is relatively slow, and many proprietary mods, provide a reflection based API. But here, we can drop those APIs if we are using just the blocks.
Though, it is possible using the FML system, it is not recommended that you use the
@OjbectHolder annotation to look up vanilla blocks or items, since they are easily accessible from the respective classes in
in the format of modid:name ↩
To be covered in a later date (once I work this out). ↩