MinecraftForge/MinecraftForge — pull request #277 by Xhamolk (2012-11-27 03:24:23+00:00)
Title: OreDictionary addition: getOreID(ItemStack)

Allow getting the oreID from a ItemStack, as an alternative from getOreID(String).
Now is easier to exchange items for their equivalencies through the OreDictionary.

I guess this could be done elsewhere, say each modder does it if required, but would be inefficient.
Anyway, adding this wouldn't hurt at all.