Follow Up: Minecraft Recipes

At our last Dojo event we went over the basics of creating a custom recipe for our mod. Several Dojers turned dirt into gold, Nether Brick, and even a block of Diamond. This was our basic recipe:

@Init
public void load(FMLInitializationEvent event){
ItemStack[][] recipe = RecipeHelper.getBlankRecipe();
recipe[0][0] = new ItemStack(Block.dirt);
RecipeHelper.addRecipe(new ItemStack(Block.dirt), recipe);    //dirt makes dirt!
}

But wait, there’s more! We can add multiple ingredients to our recipe like so:


@Init
public void load(FMLInitializationEvent event){
ItemStack[][] recipe = RecipeHelper.getBlankRecipe();
recipe[0][0] = new ItemStack(Block.dirt);
recipe[2][2] = new ItemStack(Block.dirt);
RecipeHelper.addRecipe(new ItemStack(Block.skull), recipe);    //dirt + dirt makes a skull!
}

And we can use multiple ingredients as well:

@Init
public void load(FMLInitializationEvent event){
ItemStack[][] recipe = RecipeHelper.getBlankRecipe();
recipe[0][0] = new ItemStack(Block.dirt);
recipe[2][2] = new ItemStack(Block.cobblestone);
RecipeHelper.addRecipe(new ItemStack(Block.snow), recipe);    //dirt + cobblestone makes snow!
}

We can even output more than one item:

@Init
public void load(FMLInitializationEvent event){
ItemStack[][] recipe = RecipeHelper.getBlankRecipe();
recipe[0][0] = new ItemStack(Block.dirt);
recipe[2][2] = new ItemStack(Block.cobblestone);
RecipeHelper.addRecipe(new ItemStack(Block.cake, 32), recipe);    //dirt + cobblestone makes 32 cake! (Yummy!)
}

What other recipes have you come up with? Share in the comments below!