This tutorial is made with the intention of guiding beginners!
Pictures are included!!
If you got the time or if you are having difficulty understanding parts of the tutorial, I strongly suggest reading all of it.
This tutorial is targeted at Windows PC users.
What is covered in this tutorial?
Spoiler:
Tip: Use Ctr+F to skip to different sections.
A1) Required Programs - Things you will need.
A2) Workspace Setup - How to install the things you will need.
B1) Your First Mod
B2) Your First Item
B3*) Crafting and Smelting Recipes
B4*) Custom Textures and Icons
C*) Packaging and Publishing Your Mod
D1*) Your First Mob
D2*) undecided (equipping mob with weapons?)
* In Progress
* Planned, but not added... yet.
* Comment with suggestions and opinions.
A1) Required Programs - Things you will need.
A2) Workspace Setup - How to install the things you will need.
B1) Your First Mod
B2) Your First Item
B3*) Crafting and Smelting Recipes
B4*) Custom Textures and Icons
C*) Packaging and Publishing Your Mod
D1*) Your First Mob
D2*) undecided (equipping mob with weapons?)
* In Progress
* Planned, but not added... yet.
* Comment with suggestions and opinions.
A1 - Required Programs
Spoiler:
So here you are, starting off with a strong sense of self motivation and at the least a basic knowledge of how the Java programming language works. These programs aren't all required in the sense that you won't be able to mod without them, but they are strongly recommended, especially for self motivated entrepreneurs like yourself!
JDK 7 - Java Development Kit
Think of this as a box that contains many tools used by programs to help you write, compile, edit, and publish your Java code. These tools will be used by an IDE, or Integrated Development Environment, such as Eclipse.
Tip: Install the 32-bit version of JDK as the 64-bit version may be somewhat problematic.
7-Zip [32-bit] [64-bit]
This is pretty much the same thing as WinZip, only better! You don't really need this, but it helps alot, not just with Minecraft mods, but tons of other things too! It allows you to compress and decompress files quickly and efficiently by right clicking .zip or .7z files.
Minecraft Forge Source
This is a compressed file containing the backbone of your future Minecraft modding career. It includes MCP (Minecraft Coder's Pack), a powerful set of scripts that allow you to deobfuscate(clean up) and decompile Minecraft's core files into human readable Java code! Once the code has been edited, there are scripts included that will recompile and reobfuscate your code into .class files ready to be packaged into a mod. Download, but do not install this until you have set up your PATH variable. (PATH variable setup guide) Instructions on how to do this are provided in the next section.
Tip: You can use 7-Zip to convert a compressed file into a folder, as seen in the picture below.
Eclipse IDE [32-bit] [64-bit]
Eclipse is where you will be spending most of your time. Using an IDE makes working on projects dramatically easier, and with Minecraft Forge Source, you can even use Eclipse to test run your new mods before you publish them. Instructions on how to set up a workspace in Eclipse are included in the next section.
So here you are, starting off with a strong sense of self motivation and at the least a basic knowledge of how the Java programming language works. These programs aren't all required in the sense that you won't be able to mod without them, but they are strongly recommended, especially for self motivated entrepreneurs like yourself!
JDK 7 - Java Development Kit
Think of this as a box that contains many tools used by programs to help you write, compile, edit, and publish your Java code. These tools will be used by an IDE, or Integrated Development Environment, such as Eclipse.
Tip: Install the 32-bit version of JDK as the 64-bit version may be somewhat problematic.
Spoiler:

7-Zip [32-bit] [64-bit]
This is pretty much the same thing as WinZip, only better! You don't really need this, but it helps alot, not just with Minecraft mods, but tons of other things too! It allows you to compress and decompress files quickly and efficiently by right clicking .zip or .7z files.
Spoiler:

Minecraft Forge Source
This is a compressed file containing the backbone of your future Minecraft modding career. It includes MCP (Minecraft Coder's Pack), a powerful set of scripts that allow you to deobfuscate(clean up) and decompile Minecraft's core files into human readable Java code! Once the code has been edited, there are scripts included that will recompile and reobfuscate your code into .class files ready to be packaged into a mod. Download, but do not install this until you have set up your PATH variable. (PATH variable setup guide) Instructions on how to do this are provided in the next section.
Tip: You can use 7-Zip to convert a compressed file into a folder, as seen in the picture below.
Spoiler:

Eclipse IDE [32-bit] [64-bit]
Eclipse is where you will be spending most of your time. Using an IDE makes working on projects dramatically easier, and with Minecraft Forge Source, you can even use Eclipse to test run your new mods before you publish them. Instructions on how to set up a workspace in Eclipse are included in the next section.
A2 - Workspace Setup
Spoiler:
By now you should have everything you need to get started. You have installed Java SDK and downloaded Minecraft Forge Source. You have also aquired an IDE (Eclipse).
1. Setting the PATH variable.
http://www.java.com/...d/help/path.xml
2. Installing Minecraft Forge Source
Now that you have set up your path variable, you can install Forge Src. Once you have unpackaged the .zip file, you will have a forge folder that contains a file named install.cmd. Run this file and it will automatically install Minecraft Coder's Pack scripts, download needed files, and decompile Minecraft.jar files, preparing them to be modified.
3. Setting up Eclipse
When Forge has finished installing and you have launched Eclipse, Eclipse will present you with a dialog named Workspace Launcher. Click the Browse... button and navigate to the \mcp\eclipse folder located in the forge folder and click Ok. Eclipse should now open and display a tab named Project Explorer on the left side. The Project Explorer should have a folder named Minecraft, wherein Minecraft's decompiled source code is displayed. Forge Mod Loader has been integrated into this source.
By now you should have everything you need to get started. You have installed Java SDK and downloaded Minecraft Forge Source. You have also aquired an IDE (Eclipse).
1. Setting the PATH variable.
http://www.java.com/...d/help/path.xml
2. Installing Minecraft Forge Source
Now that you have set up your path variable, you can install Forge Src. Once you have unpackaged the .zip file, you will have a forge folder that contains a file named install.cmd. Run this file and it will automatically install Minecraft Coder's Pack scripts, download needed files, and decompile Minecraft.jar files, preparing them to be modified.
Spoiler:

3. Setting up Eclipse
When Forge has finished installing and you have launched Eclipse, Eclipse will present you with a dialog named Workspace Launcher. Click the Browse... button and navigate to the \mcp\eclipse folder located in the forge folder and click Ok. Eclipse should now open and display a tab named Project Explorer on the left side. The Project Explorer should have a folder named Minecraft, wherein Minecraft's decompiled source code is displayed. Forge Mod Loader has been integrated into this source.
Spoiler:

B1 - Your First Mod
Spoiler:
By now you should have the required programs downloaded and installed. You should also have finished setting up your workspace. Looks like your ready to begin modding!
First off, you will want to familiarize yourself with Eclipse's project explorer on the left hand side. This panel can be used to navigate through Minecraft's source code packages as well as packages you have added or modified. It is a very good idea to view the Forge Mod Loader source as many useful methods and classes are provided to make modding Minecraft much easier.
Organization is very important when programming. It is much easier to find bugs when your code is clean and tidy. When you are naming variables, classes, etc. you should pick a name that respects the function of what you are naming. For example, if you were creating a class for a new type of weapon, a sword, it would be wiser to name it something like ItemWeaponSword.java instead of class1.java or MyWeapon.java.
Lets begin.
In this section we create a package for our mod and create a basic skeleton.
Create a new package by pressing Ctr+N and selecting Package in the Java folder.
For the purpose of this tutorial, lets set the name of this package to mod.tutorial.
Your new package should now be visible in the Project Explorer on the left hand side.
Right click mod.tutorial and select New > Class.
This will open a window containing lots of options, many of which you don't need to worry about right now.
Make sure the package field is set to mod.tutorial.
We can set the name to TutorialMain.
By now you should have a new class named TutorialMain inside your mod.tutorial package. If you have followed the steps correctly, the TutorialMain class will have this piece of code already written for you:
Now you will want to add a line to your code that will allow Forge Mod Loader to identify your mod. Your code should now look like this:
Eclipse will show you a few errors on this new line. These can easily be fixed by importing the correct class. In most cases, Eclipse will automatically detect which class you want to reference and will provide it in the quick fixes list. Hover your mouse over @Mod and click Import 'Mod' to fix the errors.
Now your code should look like this:
Now we must add two lines that tell FML to instance your mod object in Minecraft. These lines must be added inside your TutorialMain class and you must import the referenced fml class.
Now you have completed creating the basic skeleton of your mod. Your full code should now look like this:
You can test your mod by clicking the Run Client button on the toolbar at the top.
Your new mod, that currently does absolutely nothing, will appear in the mods list.
In the next section, we will add a new item to our mod.
By now you should have the required programs downloaded and installed. You should also have finished setting up your workspace. Looks like your ready to begin modding!
First off, you will want to familiarize yourself with Eclipse's project explorer on the left hand side. This panel can be used to navigate through Minecraft's source code packages as well as packages you have added or modified. It is a very good idea to view the Forge Mod Loader source as many useful methods and classes are provided to make modding Minecraft much easier.
Spoiler:

Organization is very important when programming. It is much easier to find bugs when your code is clean and tidy. When you are naming variables, classes, etc. you should pick a name that respects the function of what you are naming. For example, if you were creating a class for a new type of weapon, a sword, it would be wiser to name it something like ItemWeaponSword.java instead of class1.java or MyWeapon.java.
Lets begin.
In this section we create a package for our mod and create a basic skeleton.
Create a new package by pressing Ctr+N and selecting Package in the Java folder.
Spoiler:

For the purpose of this tutorial, lets set the name of this package to mod.tutorial.
Spoiler:

Your new package should now be visible in the Project Explorer on the left hand side.
Right click mod.tutorial and select New > Class.
Spoiler:

This will open a window containing lots of options, many of which you don't need to worry about right now.
Make sure the package field is set to mod.tutorial.
We can set the name to TutorialMain.
Spoiler:

By now you should have a new class named TutorialMain inside your mod.tutorial package. If you have followed the steps correctly, the TutorialMain class will have this piece of code already written for you:
package mod.tutorial;
public class TutorialMain {
}
Now you will want to add a line to your code that will allow Forge Mod Loader to identify your mod. Your code should now look like this:
package mod.tutorial;
@Mod(modid="TutorialMain", name="Tutorial Mod", version="1.0")
public class TutorialMain {
}
These parameters (modid, name and version) are quite self explanatory. Your mod's ID should be unique to your mod in order to avoid possible conflicts with other mods. It is generally a good idea to use the name of your main class as your mod's ID. The name is what will be shown to users when they see your mod in the mods list. The version will also be shown in this list and you may use any format you wish.Eclipse will show you a few errors on this new line. These can easily be fixed by importing the correct class. In most cases, Eclipse will automatically detect which class you want to reference and will provide it in the quick fixes list. Hover your mouse over @Mod and click Import 'Mod' to fix the errors.
Spoiler:

Now your code should look like this:
package mod.tutorial;
import cpw.mods.fml.common.Mod;
@Mod(modid="TutorialMain", name="Tutorial Mod", version="1.0")
public class TutorialMain {
}
Now we must add two lines that tell FML to instance your mod object in Minecraft. These lines must be added inside your TutorialMain class and you must import the referenced fml class.
@Instance("TutorialMain")
public static TutorialMain instance;
Now you have completed creating the basic skeleton of your mod. Your full code should now look like this:
package mod.tutorial;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Instance;
@Mod(modid="TutorialMain", name="Tutorial Mod", version="1.0")
public class TutorialMain {
@Instance("TutorialMain")
public static TutorialMain instance;
}
You can test your mod by clicking the Run Client button on the toolbar at the top.
Spoiler:

Your new mod, that currently does absolutely nothing, will appear in the mods list.
Spoiler:

In the next section, we will add a new item to our mod.
B2 - Your First Item
Spoiler:
By now you have created a basic skeleton for your first mod, which still does not do anything more than look nice in the mods list.
New items are one of the most basic types of content you can add, although they have the potential to be quite complex as well. All items and blocks have a unique ID. Trying to give a new item an ID that is already taken will cause errors when trying to run your mod. Here is a reference list of all blocks and items in Minecraft, along with their respective IDs.
Lets begin.
In this section we create a new item and add it to the creative menu.
Create a new class by right clicking your mod.tutorial package and clicking New > Class.
This will open a window with a few options. The ones we are worried about are name and superclass. For our example, we will set the name to ItemSandwich. We can add net.minecraft.item.Item as our superclass. Make sure you also check the Constructors from superclass box.
If you have filled the options correctly, you should end up with this code in your new ItemSandwich class:
This will serve as a skeleton for our new item. Now lets go back to our TutorialMain class. FML has a convenient method which allows you to register your new item into Minecraft. Tasks such as registering items and blocks may be done when your mod is loading. Luckily, FML also has built in event 'hooks' that are called when a particular event occurs in Minecraft, such as your mod being loaded.
Add these lines to your TutorialMain class and import the required classes:
Any code inside the load method will be executed when your mod is being loaded.
Your full TutorialMain code should now look like this:
Now that we have a place to register our item, we can write the code to do it. Add this line inside your load method:
When you right click Item to import the required class, make sure you select net.minecraft.item.Item.
The above line of code simply creates a new Item named itemSandwich, which uses the ItemSandwich() class (the one we just made) and gives it the unique ID of 500.
Note: Capitalization is very important when programming. As seen above, itemSandwich is not the same as ItemSandwich().
We still need to give our item a name to show when you hover your mouse over it in Minecraft! This must be done through the Language Registry and can be accomplished by adding this line to your load method:
Your full TutorialMain code should now look like this:
It looks like we're done!
Oops! Hold on a minute! We don't have a way to actually get this item yet. Lets add it to the creative menu for now. Crafting and smelting recipes are covered in the next section!
Go back to your ItemSandwich class.

Replace the // TODO comment with this line of code:
Obviously, this will add your new Sandwich item to the Food tab in the creative menu. There are many tabs to choose from, and it is really up to you which tab you want to put your new items in. Just because we named it Sandwich doesn't mean it must be put into the Food tab.
Eclipse will often show you a list of possibilities that you can choose from when they are available, as seen in the picture below, given that you have imported the correct classes (in our case: net.minecraft.creativetab.CreativeTabs)
Now that we have created our item, named our item, and added a way for us to get our item, we can test it out by clicking the Run Client button in the toolbar at the top.
In the next section, we will add new crafting and smelting recipes to our mod.
Custom textures and icons are covered later in the tutorial.
By now you have created a basic skeleton for your first mod, which still does not do anything more than look nice in the mods list.
New items are one of the most basic types of content you can add, although they have the potential to be quite complex as well. All items and blocks have a unique ID. Trying to give a new item an ID that is already taken will cause errors when trying to run your mod. Here is a reference list of all blocks and items in Minecraft, along with their respective IDs.
Lets begin.
In this section we create a new item and add it to the creative menu.
Create a new class by right clicking your mod.tutorial package and clicking New > Class.
Spoiler:

This will open a window with a few options. The ones we are worried about are name and superclass. For our example, we will set the name to ItemSandwich. We can add net.minecraft.item.Item as our superclass. Make sure you also check the Constructors from superclass box.
Spoiler:

If you have filled the options correctly, you should end up with this code in your new ItemSandwich class:
package mod.tutorial;
import net.minecraft.item.Item;
public class ItemSandwich extends Item {
public ItemSandwich(int par1) {
super(par1);
// TODO Auto-generated constructor stub
}
}
This will serve as a skeleton for our new item. Now lets go back to our TutorialMain class. FML has a convenient method which allows you to register your new item into Minecraft. Tasks such as registering items and blocks may be done when your mod is loading. Luckily, FML also has built in event 'hooks' that are called when a particular event occurs in Minecraft, such as your mod being loaded.
Add these lines to your TutorialMain class and import the required classes:
@Init
public void load(FMLInitializationEvent event) {
}
Any code inside the load method will be executed when your mod is being loaded.
Your full TutorialMain code should now look like this:
package mod.tutorial;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid="TutorialMain", name="Tutorial Mod", version="1.0")
public class TutorialMain {
@Instance("TutorialMain")
public static TutorialMain instance;
@Init
public void load(FMLInitializationEvent event) {
}
}
Now that we have a place to register our item, we can write the code to do it. Add this line inside your load method:
Item itemSandwich = new ItemSandwich(500).setItemName("itemSandwich");
When you right click Item to import the required class, make sure you select net.minecraft.item.Item.
The above line of code simply creates a new Item named itemSandwich, which uses the ItemSandwich() class (the one we just made) and gives it the unique ID of 500.
Note: Capitalization is very important when programming. As seen above, itemSandwich is not the same as ItemSandwich().
We still need to give our item a name to show when you hover your mouse over it in Minecraft! This must be done through the Language Registry and can be accomplished by adding this line to your load method:
LanguageRegistry.addName(itemSandwich, "Sandwich");This simply adds the name "Sandwich" to the object itemSandwich.
Your full TutorialMain code should now look like this:
package mod.tutorial;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="TutorialMain", name="Tutorial Mod", version="1.0")
public class TutorialMain {
@Instance("TutorialMain")
public static TutorialMain instance;
@Init
public void load(FMLInitializationEvent event) {
Item itemSandwich = new ItemSandwich(500).setItemName("itemSandwich");
LanguageRegistry.addName(itemSandwich, "Sandwich");
}
}
It looks like we're done!
Oops! Hold on a minute! We don't have a way to actually get this item yet. Lets add it to the creative menu for now. Crafting and smelting recipes are covered in the next section!
Go back to your ItemSandwich class.

Replace the // TODO comment with this line of code:
this.setCreativeTab(CreativeTabs.tabFood);
Obviously, this will add your new Sandwich item to the Food tab in the creative menu. There are many tabs to choose from, and it is really up to you which tab you want to put your new items in. Just because we named it Sandwich doesn't mean it must be put into the Food tab.
Eclipse will often show you a list of possibilities that you can choose from when they are available, as seen in the picture below, given that you have imported the correct classes (in our case: net.minecraft.creativetab.CreativeTabs)
Spoiler:

Now that we have created our item, named our item, and added a way for us to get our item, we can test it out by clicking the Run Client button in the toolbar at the top.
Spoiler:

In the next section, we will add new crafting and smelting recipes to our mod.
Custom textures and icons are covered later in the tutorial.
B3 - Crafting and Smelting Recipes
Spoiler:
By now you have created an item for your mod, but currently the only way to get your item is through the creative menu.
There are three main types of 'recipes' that we will discuss; smelting, shaped crafting, and shapeless crafting.
The first is the simplest; 'smelting' recipes or furnace recipes. Implementing these allows you to put your item into a furnace to create another item OR to use another item in a furnace to create your item.
Another type of recipe is shaped crafting, or crafting on a table using a pattern.
Shapeless crafting is like shaped crafting, but it does not require items to be in a pattern.
Lets begin.
In this section we add a shapeless crafting recipe and smelting (furnace) recipe to our new item.
Navigate to your TutorialMain.java class.
New recipes must be registered using the GameRegistry, similar to how an item's visible name is registered using the LanguageRegistry. We can register a shapeless recipe by adding the following line in our load method:
Any item that is in a container (such as your inventory or a furnace) is referred to as a stack. Note that even if you only have one of that item in your inventory, it will still be called a stack.
You can add more ingredients to the recipe as well. The first ItemStack you refer to in addShapelessRecipe() is the output and the ItemStacks after the output are the inputs.
Lets add a cooked steak to this recipe. Change the line of code to look like this:
Furnace recipes work in the same way, except that you may only have one input. Note that in furnace recipes, the input comes first and the output comes second. There is also a floating point number at the end that defines how much experience the player will get for each item smelted.
Add this line to add a smelting recipe:
Note: Registering item and block ID's using Forge will shift the defined ID by 256. Our Sandwich item's effective ID thus becomes 726 instead of what we defined; 500.
Getting dirt after burning a sandwich hardly seems realistic, but it is done here to show how blocks are referred to as ItemStacks in a container as well.
Your complete TutorialMain.java script should now look like this:
Shaped crafting can be a bit confusing.
In the next section, we will create and add a custom texture/icon for our new item.
By now you have created an item for your mod, but currently the only way to get your item is through the creative menu.
There are three main types of 'recipes' that we will discuss; smelting, shaped crafting, and shapeless crafting.
The first is the simplest; 'smelting' recipes or furnace recipes. Implementing these allows you to put your item into a furnace to create another item OR to use another item in a furnace to create your item.
Another type of recipe is shaped crafting, or crafting on a table using a pattern.
Shapeless crafting is like shaped crafting, but it does not require items to be in a pattern.
Lets begin.
In this section we add a shapeless crafting recipe and smelting (furnace) recipe to our new item.
Navigate to your TutorialMain.java class.
Spoiler:
New recipes must be registered using the GameRegistry, similar to how an item's visible name is registered using the LanguageRegistry. We can register a shapeless recipe by adding the following line in our load method:
GameRegistry.addShapelessRecipe(new ItemStack(itemSandwich,1), new ItemStack(Item.bread));This line registers a recipe that will let you craft 1 Sandwich out of 1 Bread.
Spoiler:
Any item that is in a container (such as your inventory or a furnace) is referred to as a stack. Note that even if you only have one of that item in your inventory, it will still be called a stack.
You can add more ingredients to the recipe as well. The first ItemStack you refer to in addShapelessRecipe() is the output and the ItemStacks after the output are the inputs.
Lets add a cooked steak to this recipe. Change the line of code to look like this:
GameRegistry.addShapelessRecipe(new ItemStack(itemSandwich,1), new ItemStack(Item.bread), new ItemStack(Item.beefCooked));
Furnace recipes work in the same way, except that you may only have one input. Note that in furnace recipes, the input comes first and the output comes second. There is also a floating point number at the end that defines how much experience the player will get for each item smelted.
Add this line to add a smelting recipe:
GameRegistry.addSmelting(itemSandwich.itemID, new ItemStack(Block.dirt), 0.0F);This will allow you to put your Sandwich into a furnace and get 1 Dirt in return, and will not give you any experience. Note how the input is not an ItemStack in a furnace recipe, but instead an item's ID. If you wanted, you could put an integer instead of itemSandwich.itemID to achieve the same thing. The following line of code is the same as the above code:
GameRegistry.addSmelting(726, new ItemStack(Block.dirt), 0.0F);
Note: Registering item and block ID's using Forge will shift the defined ID by 256. Our Sandwich item's effective ID thus becomes 726 instead of what we defined; 500.
Getting dirt after burning a sandwich hardly seems realistic, but it is done here to show how blocks are referred to as ItemStacks in a container as well.
Your complete TutorialMain.java script should now look like this:
Spoiler:
package mod.tutorial;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="TutorialMain", name="Tutorial Mod", version="1.0")
public class TutorialMain {
@Instance("TutorialMain")
public static TutorialMain instance;
@Init
public void load(FMLInitializationEvent event) {
Item itemSandwich = new ItemSandwich(500).setItemName("itemSandwich");
LanguageRegistry.addName(itemSandwich, "Sandwich");
GameRegistry.addShapelessRecipe(new ItemStack(itemSandwich,1), new ItemStack(Item.bread), new ItemStack(Item.beefCooked));
GameRegistry.addSmelting(itemSandwich.itemID, new ItemStack(Block.dirt), 0.0F);
}
}
Shaped crafting can be a bit confusing.
Spoiler:
You can use shaped crafting recipes in a 1 by 1 format, 2 by 2, or 3 by 3 format. Consider the following examples:


Our final example uses spaces to show empty crafting table slots, and also adds a 3rd ItemStack to be used.

Shaped crafting recipes are added using GameRegistry.addRecipe() and can be broken down into 3 main sections. The first section is the output. The second section are letters that represent ItemStacks arranged into rows. The third section are pairings that show which Items the letters in the second section represent.
I will not be adding a shaped crafting recipe to this tutorial for now.
You can use shaped crafting recipes in a 1 by 1 format, 2 by 2, or 3 by 3 format. Consider the following examples:
GameRegistry.addRecipe(new ItemStack(itemSandwich,1), "BBB","MMM","BBB", 'B' new ItemStack(Item.bread), 'M', new ItemStack(Item.beefCooked));This line will add a 3x3 recipe, allowing you to get a Sandwich by placing 3 Bread at the top, 3 Steak in the middle, and 3 Bread at the bottom.

GameRegistry.addRecipe(new ItemStack(itemSandwich,3), "BMB","BMB","BMB", 'B', new ItemStack(Item.bread), 'M', new ItemStack(Item.beefCooked));This is an example of another 3x3 recipe that gives you 3 Sandwiches instead of 1.

Our final example uses spaces to show empty crafting table slots, and also adds a 3rd ItemStack to be used.
GameRegistry.addRecipe(new ItemStack(itemSandwich,1), " b ","mpm"," b ", 'b', new ItemStack(Item.bread), 'm', new ItemStack(Item.beefCooked), 'p', new ItemStack(Item.potato));This line of code adds a recipe where you must put bread in the middle on the top row. In the middle row, you put meat, potato, meat. In the bottom row, you put bread in the middle. This will give you one Sandwich.

Shaped crafting recipes are added using GameRegistry.addRecipe() and can be broken down into 3 main sections. The first section is the output. The second section are letters that represent ItemStacks arranged into rows. The third section are pairings that show which Items the letters in the second section represent.
I will not be adding a shaped crafting recipe to this tutorial for now.
In the next section, we will create and add a custom texture/icon for our new item.
B4 - Custom Textures and Icons
Spoiler:
...
...
Trouble understanding parts of the tutorial? Post your concerns and help make this tutorial more user-friendly!
Still working on this tutorial. Constructive feedback and comments are appreciated.
If this tutorial helped you, be sure to +1 this post.












