I've recently started modding with ModLoader, and I have but one problem, when making this item, how do I assign it a graphic from another file, say emerald.png?
mod_ItemEmeraldIngot
package net.minecraft.src;
public class mod_ItemEmeraldIngot extends BaseMod{
public static final Item emeraldIngot;
public void RegisterTextureOverrides()
{
ModLoader.addOverride("/gui/items.png","/gui/Emerald.png");
}
static
{
emeraldIngot = (new ItemGemIngot(150)).setIconCoord(10, 0).setItemName("Emerald Ingot");
}
public String Version()
{
return "1.2_02";
}
//FOR testing purposes
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(emeraldIngot), new Object[]{
" X ", "###", Character.valueOf('#'), Item.stick, Character.valueOf('X'), Block.planks
});
}
}
I wouldn't do that, seeing as it doesn't set the graphic to my emerald ingot, it sets it to the Apple.
nor would I do this;
package net.minecraft.src;
public class mod_ItemEmeraldIngot extends BaseMod{
public static final Item emeraldIngot;
static
{
emeraldIngot = (new ItemGemIngot(150, ModLoader.addOverride("/gui/items.png","/gui/Emerald.png"))).setIconCoord(10, 0).setItemName("Emerald Ingot");
}
public String Version()
{
return "1.2_02";
}
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(emeraldIngot), new Object[]{
" X ", "###", Character.valueOf('#'), Item.stick, Character.valueOf('X'), Block.planks
});
}
}
I'm really confused. Any help, greatly GREATLY appreciated.
Hey, all! Quick question, I've made the item class, but how can I assign it a custom graphic? I have an "items2.png" file, but how would I assign, say ItemCoord(10,5) to an item?
How could I get minecraft to read items off of a separate .png? For example, the default items.png is 256x256. Anyways I could duplicate this and have items.png and items2.png? That way for items 2 I could have all the armor and weapons, and items have all the ...items?
Not at all. The FIRST part of my mod adds 160 new items..If there were any way for me to be able to rename this to items2.png, and use both items and items2, that'd be amazing. But, I'm not sure if there IS a way to read two different item images.
That lets me update the size, so I can have bigger image size? I still have the default size 16x16, I want to add more items, not just change the size of them..
0
Thanks for the response though.
0
mod_ItemEmeraldIngot
I wouldn't do that, seeing as it doesn't set the graphic to my emerald ingot, it sets it to the Apple.
nor would I do this;
I'm really confused. Any help, greatly GREATLY appreciated.
0
0
0
0
0
0
0
0
0
0
0
0
0