1
Item wont spawn?
Conversation has gone to the second page
Create an account or sign in to comment.
19
I'm using ModLoader
Try spawning in the item id + 256 because if youre using forge it adds 256 to the item id to get it off the vanilla range
Alright back to experimenting >;D thank you for all your help
Got it to work also, do you have any idea why it won't spawn the armor in the entity file?
Nope.
All textures should go in the items folder or the blocks folder within the textures folder. (Blocks - blocks Items - items)
Can't find any other ways... any advice where to put textures?
I got the item to show up but I need help with the texture.. I have it in 3 spots but none are right cause I got this error when ran ..
2013-06-15 20:43:36 [CLIENT] [WARNING] TextureManager.createTexture called for file textures/items/null.png, but that file does not exist. Ignoring.
Is there any correct spot to put my texture?
2013-06-15 20:43:36 [CLIENT] [WARNING] TextureManager.createTexture called for file textures/items/null.png, but that file does not exist. Ignoring.
Is there any correct spot to put my texture?
Did you put the texture in the textures/items folder, and then name it the same as the UnlocalizedName in the code?
yup... i'll look up some other ways online if it's possible
Did you change updateIcons to registerIcons?
I looked in the item code, and did see that it was changed after you posted that.
I looked in the item code, and did see that it was changed after you posted that.
I changed the code in the mod file but for the Item class code I get the error:
for iconIndex
Edit: did a quick search and iconIndex was changed to itemIcon now lets see if it works... nope not working
iconIndex cannot be resolved or is not a field
for iconIndex
Edit: did a quick search and iconIndex was changed to itemIcon now lets see if it works... nope not working
Mod Class:
Change:
public static final Item GoldenEggs = new ItemGoldenEggs(179);
To:
public static final Item GoldenEggs = new ItemGoldenEggs(2026).setUnlocalizedName("Golden Egg");
Any name can go in the name-thing, actually. I'm not sure if you can put the unlocalized name in the Item file, but if you can, you do not put the name as the item's texture.
And add this code to the Item Class:
public void updateIcons(IconRegister par1IconRegister)
{
this.iconIndex = par1IconRegister.registerIcon("goldenegg");
}
That is for the item's texture. Do not put the .png extension, just leave it as the name of the texture before the extension.
Change:
public static final Item GoldenEggs = new ItemGoldenEggs(179);
To:
public static final Item GoldenEggs = new ItemGoldenEggs(2026).setUnlocalizedName("Golden Egg");
Any name can go in the name-thing, actually. I'm not sure if you can put the unlocalized name in the Item file, but if you can, you do not put the name as the item's texture.
And add this code to the Item Class:
public void updateIcons(IconRegister par1IconRegister)
{
this.iconIndex = par1IconRegister.registerIcon("goldenegg");
}
That is for the item's texture. Do not put the .png extension, just leave it as the name of the texture before the extension.
I already had that piece of code there when I installed my mod but it still didn't work. Any other ideas?
I have that at the top of my item file... Is that what you mean by item class?
yes, these "files" are classes once you reobsuficate it.
Really simple
In your item class put this:
this.setCreativeTab(CreativeTabs.material);
In your item class put this:
this.setCreativeTab(CreativeTabs.material);
Sorry, I only know the bukkit API
i'd love to help, but it's been such a long time since i've coded with modloader...forge is pretty different... i'll have to review some modloader code a little and then i'll see if i can help...