Minecraft Blogs / Tutorial

Jet's Modding Tutorials/Items/1.0.0

  • 504 views, 3 today
  • 3
  • 2
  • 2
Jetthebuizel's Avatar Jetthebuizel
Level 46 : Master Gent
131
To make an item you need to make a file named ItemNamehere (change the namehere to your item name e.g ItemHamburger). When I get home I will get some old code to show you how to have multiple items on your mod_Namehere.java file, but for now I only have new code cuz I am without an IDE at school x .
I for got to add in the last tut that you need to add this to your mod_Namehere.java file.

Code:public String getVersion()
{
return "V1";
}

public void load()
{

}
}

Alright time for the item.

Here is the ItemNamehere.java

Code:package net.minecraft.src;

import java.util.Random;

public class ItemNamehere extends Item
{

public ItemNamehere (int i)
{
super(i);
maxStackSize = 64;
}
}

And here is the mod_Namhere.java (without other items or blocks in it)

Code:package net.minecraft.src;

public class mod_Namehere extends BaseMod
{
public static final Item Namehere = new Item(30000).setItemName("Namehere");

public mod_Namehere()
{
Namehere.iconIndex = ModLoader.addOverride("/gui/items.png", "/Namehere.png");
ModLoader.AddName(Namehere, "Namehere");
ModLoader.AddRecipe(new ItemStack(Namehere, 1), new Object[] {
"XPX", "PSP", "XPX", Character.valueOf('P'), Item.porkCooked, Character.valueOf('X'), Item.redstone, Character.valueOf('S'), Item.swordStone
});
}

public String Version()
{
return "1.0.0";
}
public void load(){}}

Thanks for reading my tutorials. Have any questions PM me.
Tags

Create an account or sign in to comment.

1
02/02/2012 7:32 pm
Level 38 : Artisan Caveman
cool5927
cool5927's Avatar
and update it
1
02/02/2012 7:32 pm
Level 38 : Artisan Caveman
cool5927
cool5927's Avatar
put a vid
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome