Compilation of Modding Tutorials.

Posts 18 of 8 · Page 1 of 1
Compilation of Modding Tutorials.
Modding Tutorials

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: 12/Dec/2010
Minecraft Version: 1.2.6
MCP Version: 2.5
Author: simo_415

Create a new Recipe
Difficulty/Time: 1/10
Last Update: 12/Dec/2010
Minecraft Version: 1.2.6
MCP Version: 2.5
Author: simo_415

Create a new Item type
Difficulty/Time: 2/10
Last Update: 12/Dec/2010
Minecraft Version: 1.2.6
MCP Version: 2.5
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: 1.2.6
MCP Version: 2.5
Author: simo_415

Create a new NPC
Difficulty/Time: 6/10
Last Update: 17/Dec/2010
Minecraft Version: 1.2.6
MCP Version: 2.5
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: 1.2.6
MCP Version: 2.5
Author: simo_415

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

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

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:
Code:
BlockExample
Block
CraftingManager
4. 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.
first off, nice
second, how the hell did u get it stickied so damn quick?
Quote Originally Posted by Reaper8281 View Post
first off, nice
second, how the hell did u get it stickied so damn quick?
Toxin as a friend is always a great advantage.
ah good point
good man that Toxin
okay back ontopic: we could finally get some working cheats on here now!!
Were do the mods go? I see under src a bunch of .java files so im assuming I just copy the mods to this folder?
Quote Originally Posted by Mortifix View Post
Were do the mods go? I see under src a bunch of .java files so im assuming I just copy the mods to this folder?
The mods go with the corresponding folder in the .jar file.
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?