In these tutorials I will explain how to create basic mods. I am willing to help people learn how to mod and I will take requests on how to mod certain things. The aim of this thread is to create a central location for all tutorials.
Below is a tutorial list which has details about each mod. Note that no matter how old the tutorial is, what you should learn in the tutorial is how to go about modding that particular aspect of the game.
Note: MCP only works for the version of Minecraft it is released with. You CANNOT use MCP with a newer or older version of minecraft. For example: MCP 2.6 ONLY works with Minecraft 1.1_02.
Tutorial List (Game Mods):
Create a new Block type
Difficulty/Time: 2/10
Last Update: 21/Feb/2011
Minecraft Version: Alpha 1.2.6 - Beta 1.5_01
MCP Version: 2.7-3.1
Author: simo_415
Create a new Recipe
Difficulty/Time: 1/10
Last Update: 12/Dec/2010
Minecraft Version: Alpha 1.2.6 - Beta 1.5_01
MCP Version: 2.5 - 3.1
Author: simo_415
Create a new Item type
Difficulty/Time: 2/10
Last Update: 12/Dec/2010
Minecraft Version: Alpha 1.2.6 - Beta 1.5_01
MCP Version: 2.5 - 3.1
Author: simo_415
Create a new Block for the Furnace
Difficulty/Time: 2/10
Last Update: 14/Dec/2010
Minecraft Version: 1.2.6 - ?
MCP Version: 2.5 - ?
Author: Marcus101RR
Customising a block class
Difficulty/Time: 3/10
Last Update: 17/Dec/2010
Minecraft Version: Alpha 1.2.6 - Beta 1.5_01
MCP Version: 2.5 - 3.1
Author: simo_415
Create a new NPC
Difficulty/Time: 6/10
Last Update: 17/Dec/2010
Minecraft Version: Beta 1.5_01
MCP Version: 2.7-3.1
Author: simo_415
Controlling NPC movement
Difficulty/Time: 6/10
Last Update: 20/Jan/2011
Minecraft Version: 1.1_02
MCP Version: 2.6
Author: OgreSean
Create custom world generation
Difficulty/Time: 5/10
Last Update: 17/Dec/2010
Minecraft Version: Alpha 1.2.6 - Beta 1.5_01
MCP Version: 2.5 - 3.1
Author: simo_415
Making an Item with ModLoader
Difficulty/Time: 3/10
Last Update: 20/Feb/2011
Minecraft Version: Beta 1.2_02
MCP Version: 2.7
Author: Gidding
Custom WorldGeneration (ModLoader)
Difficulty/Time: 5/10
Last Update: 20/Feb/2011
Minecraft Version: Beta 1.2_02
MCP Version: 2.7
Author: Club559
Creating a weapon (ModLoader)
Difficulty/Time: 3/10
Last Update: 18/Mar/2011
Minecraft Version: Beta 1.3_01
MCP Version: 2.9
Author: blahthing
Creating a pickaxe/shovel (ModLoader)
Difficulty/Time: 3/10
Last Update: 18/Mar/2011
Minecraft Version: Beta 1.3_01
MCP Version: 2.9
Author: blahthing
Create a Custom Block with Modloader
Difficulty/Time: 2/10
Last Update: 17/Jun/2011
Minecraft Version: Beta 1.6.6
MCP Version: 3.3
Author: BuilderJ3rk
Tutorial List (Other):
Making your mod compatible with the ModLoader
Difficulty/Time: 4/10
Last Update: 9/Jan/2011
Author: Club559
How to make a simple person mob (with ModLoader)
Difficulty/Time: 5/10
Last Update: 9/Jan/2011
Author: Club559
How to update a mod to the latest version of MC (without MCP)
Difficulty/Time: 8/10
Last Update: 28/Dec/2010
Author: simo_415
How to mod on a MAC
Difficulty/Time: 4/10
Last Update: 12/Jan/2011
Author: BHCS
Thorough guide to beginning Minecraft modding
Difficulty/Time: 1-3/10
Author: birjolaxew
Complete beginners guide to modding
Difficulty/Time: 1-3/10
Author: Mr. Hobo
Fixing common compile and runtime errors
Difficulty/Time: 1/10
Last Update: 21/May/2011
Author: simo_415
SMP Modding:
How to mod a SMP server
Difficulty/Time: Varies
Author: Mzaq
If you would like another tutorial added to this list please PM me the link to the thread/post and if it is a legitimate modding tutorial I will add it to this list.
Requirements
1. Java Development Kit 6 (JDK6)
2. Minecraft Coder Pack (latest)
3. EditPlus/Notepad++/Eclipse/Netbeans (text editor with syntax highlighting)
4. Programming knowledge, preferably Java
To begin with
1. Setup the minecraft coder pack (MCP)
1.1 Extract the ZIP to a directory on your computer, for this example; C:/MCP
1.2 Copy the whole .minecraft/bin and .minecraft/resources directories to C:/MCP/jars/
1.3 Run decompile.bat
2. Open two Windows, one to C:/MCP/sources/minecraft/net/minecraft/src the other to C:/MCP/
Running your mods
To run your mods you first need to compile, debug, and test.
1. To compile run 'recompile.bat' this will generate all the class files for minecraft.
2. Go to C:/MCP/logs/minecraft_compile.log and search for ^ if this character is not found, there are no compile errors. If there is you will need to fix your code where the errors are and try compiling again.
3. If there is no errors, run 'test_game.bat'.
4. This will bring up an alternate version of minecraft with your mod installed - test your mod.
Once satisfied that the mod is complete you need to obfuscate it so that it can be added to minecraft.jar
Using Eclipse
You can use Eclipse to write your mod in, debug your code, compile your code, run your code - it will save you a lot of time in the long run if you use it.
Obfuscating the Code
Obfuscating the code allows your mod to work in minecraft.jar for anyone
1. Open C:/MCP/conf/client_conf.txt
2. Remove all the lines in the file.
3. Add the classes you changed, for example:
BlockExample Block CraftingManager4. Run 'reobf.bat'
5. All the classes contained within C:/MCP/final_out/minecraft/ are the mod classes. Add these to minecraft.jar to add your mod to the game.
Any questions about this feel free to ask. Please refer people who are posting on how to add a block/crafting recipe to this post. I will probably add a few more tutorials on how to do simple things. Any feedback is appreciated.











