Modding Disclaimer:
I, Or1g1n_Of_Death, do not take any responsibility for anything that might happen to your computer or any device you use while making code that may be unwanted. Anything saying I will be sued, etc. Will be deleted and you will be told to review this section.
Just in case you didn't exactly get what I first said...
Or1g1n_Of_Death is not responsible for anything that happens to your device you use to mod with, that you may not want. Thank you, have a nice day.
Signed,
~Or1g1n; The King
Back To Modding!
Ok, I know I haven't gotten around to the items tutorial yet, so, here it is!
Well, this is quite amazingly easy. You're going to have to make another mod_ItemName file, and then an ItemItemName.java file. Just to make this a bit short, here's what everything should look like:
ItemItemName.java
mod_ItemNameHere.java
~Or1g1n; The King
I, Or1g1n_Of_Death, do not take any responsibility for anything that might happen to your computer or any device you use while making code that may be unwanted. Anything saying I will be sued, etc. Will be deleted and you will be told to review this section.
Just in case you didn't exactly get what I first said...
Or1g1n_Of_Death is not responsible for anything that happens to your device you use to mod with, that you may not want. Thank you, have a nice day.
Signed,
~Or1g1n; The King
Back To Modding!
Ok, I know I haven't gotten around to the items tutorial yet, so, here it is!
Well, this is quite amazingly easy. You're going to have to make another mod_ItemName file, and then an ItemItemName.java file. Just to make this a bit short, here's what everything should look like:
ItemItemName.java
- Code:
package net.minecraft.src; //Referenced package
import java.util.Random; //Importing Java
public class ItemItemName extends Item //What the Item extends
{
public ItemItemName (int i)
{
super(i);
maxStackSize = 64; //States max amount of item in a stack.. Duh :P
}
}
mod_ItemNameHere.java
- Code:
package net.minecraft.src;
public class mod_ItemNameHere extends BaseMod //Extends BaseMod
{
public static final Item ItemNameHere = new Item(7502).setItemName("DiamondNugget"); //7502 is the Item ID.
public void load() { //public void load now replaces public class in ModLoader since 1.0
{
ItemNameHere.iconIndex = ModLoader.addOverride("/gui/items.png", "folder/ItemNameHere.png");
ModLoader.AddName(ItemNameHere, "ItemNameHere");
ModLoader.AddRecipe(new ItemStack(Item.ItemNameHere, 3), new Object[] {
" # ", Character.valueOf('#'), Item.diamond
});
}
public String getVersion()
{
return "1.0.0";
}
~Or1g1n; The King