1

Item wont spawn?

ThatRandomGuy296 6/13/13 10:20 pm
667
6/17/2013 9:06 am
Conversation has gone to the second page
Posted by
ThatRandomGuy296
Level 13 : Journeyman System
2

  Have something to say?

JoinSign in

19

ThatRandomGuy296
06/17/2013 9:06 am
Level 13 : Journeyman System
I'm using ModLoader
1
nickfromgreece
06/16/2013 4:20 pm
Level 54 : Grandmaster Programmer
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 13 : Journeyman System
Alright back to experimenting >;D thank you for all your help
1
ThatRandomGuy296
06/16/2013 3:16 pm
Level 13 : Journeyman System
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
Nope.
1
sed11
06/16/2013 2:58 pm
Level 66 : High Grandmaster Hero
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 13 : Journeyman System
Can't find any other ways... any advice where to put textures?
1
ThatRandomGuy296
06/15/2013 9:04 pm
Level 13 : Journeyman System
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
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 13 : Journeyman System
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
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 13 : Journeyman System
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
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 13 : Journeyman System
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 13 : Journeyman System
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 34 : Artisan Modder
yes, these "files" are classes once you reobsuficate it.
1
duke_Frans
06/14/2013 7:34 am
Level 66 : High Grandmaster Modder
Really simple
In your item class put this:
this.setCreativeTab(CreativeTabs.material);
1
n31ln3t
06/14/2013 2:14 am
Level 8 : Apprentice Network
Sorry, I only know the bukkit API
1
Nulcheck
06/14/2013 2:11 am
Level 34 : Artisan Modder
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

Welcome