Creating a Smelting Recipe
The final type of Recipe in Minecraft is a smelting recipe. A smelting recipe has only a single input and a single output slot. The input can, again, have a stack size of only one, and the output can be more than one. Another thing to note is that smelting a recipe grants experience. The amount has to be set for the smelting recipe as well. Following is an example of a smelting recipe:
GameRegistry.addSmelting(Blocks.stone, new ItemStack(Blocks.stonebrick), 0.1F);
The first parameter can be an Item, Block, or ItemStack, but always with size 1. The second parameter has to be an ItemStack, and you can do everything with it you want here. The final parameter is a float value for the experience points you get from smelting this. A float in Java is basically a number with decimals. The vanilla smelting recipes have an experience return between 0.1F and 1F, where 0.1F is the recipe for cobblestone into stone and 1F is for smelting diamond ores.
Figure 3.4 shows this recipe in the game.
FIGURE 3.4 A smelting recipe.