ModLoader Modding Tutorial using Eclipse! I will make tutorials for Blocks and generation but not right now!
Hello, i am going to show you how to make new tools, blocks, block generation and many more!
First i would recommend to download the free program Eclipse. You can find it herehttp://www.eclipse.org/downloads/ and chose Eclipse Classic. You may also find it useful to have MCP(shortend for Minecraft Coder Pack) you can find it here: http://mcp.ocean-lab...hp/MCP_Releases remember to chose the latest version! If you don't know how to do this watch this video:
Making Tools:
First we will want to make our constructor, it should look like this:
package net.minecraft.src;
public class mod_Mod extends BaseMod
{
public void load()
{
}
public String getVersion()
{
return "1.2.3";
}
}
Then we would want to make the tool itself:
public static final Item Pick = ItemPickaxe(1450,EnumToolMaterial.LOL).setItemName("pick");
But the EnumToolMaterial.LOL doesn't exist so then we would open up the EnumToolMaterial.java:
This is the class itself and as you see there are WOOD, STONE, IRON, EMERALD and GOLD. But, we want to add another one! So then just copy or write one yourself. Now we will make a new one, but first. We want to chose its durability, strength and how fast it will mine a block.
Now, ive made mine quite good being better than Diamond. The 3 in the front symbolises the Harvestlevel.
3 = the same strength as diamond, able to mine obsidian but not bedrock. 2000 = The number of uses it can take before it breaks. 15F = The speed of the pickaxe. 10 = The enchantability of the tool.
Now our file should look like this:
package net.minecraft.src;
public class mod_Mod extends BaseMod
{
public static final Item Pick = new ItemPickaxe(1450, EnumToolMaterial.LOL).setItemName("pick");
public void load()
{
}
public String getVersion()
{
return "1.2.3";
}
}
Next up is addName, addRecipe and IconIndex:
package net.minecraft.src;
public class mod_Mod extends BaseMod
{
public static final Item Pick = new ItemPickaxe(1450, EnumToolMaterial.LOL).setItemName("pick");
public void load()
{
ModLoader.addName(Pick, "TuTpick");
Pick.iconIndex = ModLoader.addOverride("/gui/items.png", "pick.png");
ModLoader.addRecipe(new ItemStack(Pick, 1), new Object[]
{
"###", " * ", " * ", Character.valueOf('#'), Block.dirt, Character.valueOf('*'), Item.stick
});
}
public String getVersion()
{
return "1.2.3";
}
}
So now just add your pickaxe texture into the minecraft.jar(if you're using mcp go to the jars folder and then into the minecraft.jar)
And thats it! You have sucessfully made your tool! Just rince and repeat for the other tools (Axe = ItemAxe, Shovel = ItemSpade, Sword = ItemSword, Hoe = ItemHoe) but, the recipe is diffrent for the other tools heres an example of the recipes:
I will make tutorials for Blocks and generation but not right now!
Hello, i am going to show you how to make new tools, blocks, block generation and many more!
First i would recommend to download the free program Eclipse. You can find it herehttp://www.eclipse.org/downloads/ and chose Eclipse Classic. You may also find it useful to have MCP(shortend for Minecraft Coder Pack) you can find it here: http://mcp.ocean-lab...hp/MCP_Releases remember to chose the latest version! If you don't know how to do this watch this video:
Making Tools:
First we will want to make our constructor, it should look like this:
Then we would want to make the tool itself:
But the EnumToolMaterial.LOL doesn't exist so then we would open up the EnumToolMaterial.java:
This is the class itself and as you see there are WOOD, STONE, IRON, EMERALD and GOLD. But, we want to add another one! So then just copy or write one yourself. Now we will make a new one, but first. We want to chose its durability, strength and how fast it will mine a block.
BEFORE:
AFTER:
Now, ive made mine quite good being better than Diamond. The 3 in the front symbolises the Harvestlevel.
3 = the same strength as diamond, able to mine obsidian but not bedrock. 2000 = The number of uses it can take before it breaks. 15F = The speed of the pickaxe. 10 = The enchantability of the tool.
Now our file should look like this:
Next up is addName, addRecipe and IconIndex:
So now just add your pickaxe texture into the minecraft.jar(if you're using mcp go to the jars folder and then into the minecraft.jar)
And thats it! You have sucessfully made your tool! Just rince and repeat for the other tools (Axe = ItemAxe, Shovel = ItemSpade, Sword = ItemSword, Hoe = ItemHoe) but, the recipe is diffrent for the other tools heres an example of the recipes:
Shovel:
Axe:
Hoe:
Sword:
NOTE: You can use any type of item/block for the tools and if you have a custom item/block you would want to use just type
Hope this tutorial helped!
Sincerly
Majorklesk/Daniboy3652