It has to be called in preInit, it takes in three parameters the Item, the metadata of the item and a ModelResourceLocation.
This works for blocks as well. a ModelResourceLocation takes in Strings one is the name of the JSON and the other is optional usually it is "inventory". You do not need to add your modid here.