Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,326 Categories: 12

Total Tutorial Views: 41,459,057

[ Minecraft ] How To Make A New Item! [ Any Version ]

Tutorial Name: [ Minecraft ] How To Make A New Item! [ Any Version ]  

Category: PC Tutorials

Submitted By: Console

Date Added:

Comments: 0

Views: 13,065

Related Forum: PC Building Forum

Share:

Hello Guys Well I Know You Guys Want Me To Get To The Tutorial.




Difficulty/Time: 2/10
Minecraft Version: Any
MCP Version: Any




1. You need to create a new file called ItemExample.java in the src directory.




2. The basic structure of the file is this:





package net.minecraft.src;

public class ItemExample extends Item
{
    public ItemFood(int i)
    {
        super(i);
        maxStackSize = 64;
    }

    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
    {
    }
}





3. You now need to add this item to minecraft so that it knows about it. To do this open up Item.java




4. Towards the bottom of the file there should be a whole heap of instance variables, add a new one:





public static Item example = (new ItemExample(95)).setIconIndex(42);





This will create a new item which is item id 256 + 95 and uses icon 42. Therefore it should look like a sign. Currently it has no properties, and you cannot craft it. But after you compile and run the mod it will add the new item to minecraft.




Thanks For All Your Guys Support. Soon I will Be Releasing My Mod.




Thanks To -
Help With Tutorial - simo_415
Written And Did The Tutorial - Console aka ME!




Next Tutorial - How To Create A New Toolset!



Ratings

Current rating: 3.51 by 53 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"[ Minecraft ] How To Make A New Item! [ Any Version ]" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.