12
Hey guys, oCanaduhh here! The recent success of my Juggernaut mod (or JuggerMod 1.0) had inspired me to give out a code that I used for the item 'Painkiller'. Anyway, all you have to do in the code [providing you have MCP, JDK and Eclipse set up] is change everything that says something like 'youritem' or 'your directory'.
You do need ModLoader installed on MCP for this to work.
Anyhow, here is the code. Simply make a new file called 'mod_YourModNameHere.java' and copy + paste!
package net.minecraft.src;
import java.util.Map;
public class mod_YourModName extends BaseMod
{
public static final Item yourfoodname = (new ItemFood(605, 10, 2F, true)).setIconIndex(ModLoader.addOverride("/gui/items.png", "yourdirectory")).setItemName("yourfoodname");
public mod_yourmodname()
{
ModLoader.addRecipe(new ItemStack(yourfoodname, 3), new Object[]
{ "XYZ", Character.valueOf('X'),Item.youritem, Character.valueOf('Y'),Item.youritem, Character.valueOf('Z'),Item.youritem
});
}
public void load()
{
}
public String getVersion()
{
return "yourfoodname";
}
}
You do need ModLoader installed on MCP for this to work.
Anyhow, here is the code. Simply make a new file called 'mod_YourModNameHere.java' and copy + paste!
Code
package net.minecraft.src;
import java.util.Map;
public class mod_YourModName extends BaseMod
{
public static final Item yourfoodname = (new ItemFood(605, 10, 2F, true)).setIconIndex(ModLoader.addOverride("/gui/items.png", "yourdirectory")).setItemName("yourfoodname");
public mod_yourmodname()
{
ModLoader.addRecipe(new ItemStack(yourfoodname, 3), new Object[]
{ "XYZ", Character.valueOf('X'),Item.youritem, Character.valueOf('Y'),Item.youritem, Character.valueOf('Z'),Item.youritem
});
}
public void load()
{
}
public String getVersion()
{
return "yourfoodname";
}
}
Tags |
800807
6
Create an account or sign in to comment.