This tutorial wlll show you how to make an item in modloader.
You need Java JDK, Modloader, Eclispe just makes everything easier, and you need MCP. Also, you need minecraft-server.jar for 1.5.2. Google it.
Setting Up.
1.Install all of the requirements.
2.Force Update Minecraft(only works for 1.5.2, for 1.6, read the text file inthe MCP download. perrsonally, I would rather start with 1.5.2 then just update it.)
3.Install Modloader 1.5.2.
4. Extract MCP to a folder.
.Copy minecraft-server.jar to the "jars" folder.
5. Copy "bin" from your .minecraft into the "jars" folder.
6. Run the decompile scripts. (.bat for Windows, .sh for Linux!)
9. Open eclispe and set the workspace to the "eclispe" folder.
You are ready!
Go under src->net.minecraft.src and right click to go to New -> Class. This is where you start coding.
First, lets create the main mod file.
package net.minecraft.src;
public class mod_Tutorial extends BaseMod{
public void load(){
}
public String getVersion(){
return "blah";
}
}
Replace mod_Tutorial with mod_YourModName.
Adding an item is SUPER simple. For this example, we are going to be using the unused "ruby" and adding it to minecraft.
Notes:
To add a texture, go to jars-bin-minecraft.jar-textures-items.
//Type this in under public class mod_Tutorial extends BaseMod
public static final Item ruby = new Item(1035).setUnlocalizedName("ruby").setCreativeTab(CreativeTabs.tabMaterials);
//I am going to explain, so don't worry!
public static final Item ruby = new Item(1035)
//That means that the ruby will have an item ID of 1035.
.setUnlocalizedName("ruby")
//That sets the texture. Read the notes. Add your texture in /textures/items in your bin.(It's in the minecraft.jar!)
.setCreativeTab(CreativeTabs.tabMaterials);
//That adds it to the Creative menu, under "Materials".
You are finished!
Now, save and close Eclispe. Run the recompile and reobfiscate scripts. Run the recompile first!
Once you have ran both, go to the reobf folder. Add "minecraft" to an archive, an distrube!
IMPORTANT!
This method, to install it to our normal minecraft cilent, you need Modloader, and you MUST drag the class files of your mod into the jar!
Hope this helped, sorry for spelling mstakes.
You need Java JDK, Modloader, Eclispe just makes everything easier, and you need MCP. Also, you need minecraft-server.jar for 1.5.2. Google it.
Setting Up.
1.Install all of the requirements.
2.Force Update Minecraft(only works for 1.5.2, for 1.6, read the text file inthe MCP download. perrsonally, I would rather start with 1.5.2 then just update it.)
3.Install Modloader 1.5.2.
4. Extract MCP to a folder.
.Copy minecraft-server.jar to the "jars" folder.
5. Copy "bin" from your .minecraft into the "jars" folder.
6. Run the decompile scripts. (.bat for Windows, .sh for Linux!)
9. Open eclispe and set the workspace to the "eclispe" folder.
You are ready!
Go under src->net.minecraft.src and right click to go to New -> Class. This is where you start coding.
First, lets create the main mod file.
package net.minecraft.src; public class mod_Tutorial extends BaseMod{ public void load(){ } public String getVersion(){ return "blah"; } } Replace mod_Tutorial with mod_YourModName.Adding an item is SUPER simple. For this example, we are going to be using the unused "ruby" and adding it to minecraft.
Notes:
To add a texture, go to jars-bin-minecraft.jar-textures-items.
//Type this in under public class mod_Tutorial extends BaseMod public static final Item ruby = new Item(1035).setUnlocalizedName("ruby").setCreativeTab(CreativeTabs.tabMaterials); //I am going to explain, so don't worry! public static final Item ruby = new Item(1035) //That means that the ruby will have an item ID of 1035. .setUnlocalizedName("ruby") //That sets the texture. Read the notes. Add your texture in /textures/items in your bin.(It's in the minecraft.jar!) .setCreativeTab(CreativeTabs.tabMaterials); //That adds it to the Creative menu, under "Materials". You are finished!Now, save and close Eclispe. Run the recompile and reobfiscate scripts. Run the recompile first!
Once you have ran both, go to the reobf folder. Add "minecraft" to an archive, an distrube!
IMPORTANT!
This method, to install it to our normal minecraft cilent, you need Modloader, and you MUST drag the class files of your mod into the jar!
Hope this helped, sorry for spelling mstakes.