1

Item wont spawn?

ThatRandomGuy296's Avatar ThatRandomGuy2966/13/13 10:20 pm
6/17/2013 9:06 am
ThatRandomGuy296's Avatar ThatRandomGuy296
Conversation has gone to the second page
Posted by ThatRandomGuy296's Avatar
ThatRandomGuy296
Level 12 : Journeyman Engineer
2

Create an account or sign in to comment.

19

ThatRandomGuy296
06/17/2013 9:06 am
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
I'm using ModLoader
1
nickfromgreece
06/16/2013 4:20 pm
Level 54 : Grandmaster Programmer
nickfromgreece's Avatar
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
1
ThatRandomGuy296
06/16/2013 4:14 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
Alright back to experimenting >;D thank you for all your help
1
ThatRandomGuy296
06/16/2013 3:16 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
Got it to work also, do you have any idea why it won't spawn the armor in the entity file?
1
sed11
06/16/2013 4:07 pm
Level 66 : High Grandmaster Hero
sed11's Avatar
Nope.
1
sed11
06/16/2013 2:58 pm
Level 66 : High Grandmaster Hero
sed11's Avatar
All textures should go in the items folder or the blocks folder within the textures folder. (Blocks - blocks Items - items)
1
ThatRandomGuy296
06/16/2013 1:28 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
Can't find any other ways... any advice where to put textures?
1
ThatRandomGuy296
06/15/2013 9:04 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
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?
1
sed11
06/15/2013 10:33 pm
Level 66 : High Grandmaster Hero
sed11's Avatar
Did you put the texture in the textures/items folder, and then name it the same as the UnlocalizedName in the code?
1
ThatRandomGuy296
06/15/2013 10:41 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
yup... i'll look up some other ways online if it's possible
1
sed11
06/14/2013 9:16 pm
Level 66 : High Grandmaster Hero
sed11's Avatar
Did you change updateIcons to registerIcons?
I looked in the item code, and did see that it was changed after you posted that.
1
ThatRandomGuy296
06/14/2013 8:33 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
I changed the code in the mod file but for the Item class code I get the error:

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
1
sed11
06/14/2013 7:33 pm
Level 66 : High Grandmaster Hero
sed11's Avatar
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.
1
ThatRandomGuy296
06/14/2013 6:38 pm
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
I already had that piece of code there when I installed my mod but it still didn't work. Any other ideas?
1
ThatRandomGuy296
06/14/2013 8:02 am
Level 12 : Journeyman Engineer
ThatRandomGuy296's Avatar
I have that at the top of my item file... Is that what you mean by item class?
1
Nulcheck
06/14/2013 5:44 pm
Level 33 : Artisan Modder
Nulcheck's Avatar
yes, these "files" are classes once you reobsuficate it.
1
duke_Frans
06/14/2013 7:34 am
Level 66 : High Grandmaster Modder
duke_Frans's Avatar
Really simple
In your item class put this:
this.setCreativeTab(CreativeTabs.material);
1
n31ln3t
06/14/2013 2:14 am
Level 8 : Apprentice Network
n31ln3t's Avatar
Sorry, I only know the bukkit API
1
Nulcheck
06/14/2013 2:11 am
Level 33 : Artisan Modder
Nulcheck's Avatar
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...
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome