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 .
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.
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 |
tools/tracking
472821
6
jets-modding-tutorialsitems100
Create an account or sign in to comment.