Jump to content

Recommended Posts

Posted

Hi!

I'm coding on a new mod. I created a new Item, the problem is that ingame there is the "no texture" texture :)

So my question:

Where should I put the texture files?

 

Thanks Mike

Posted
  On 5/25/2014 at 10:44 AM, diesieben07 said:

Assets go in src/main/resources/assets/modId/

Ok, i made these folder.

So my folder structure ist like that:

src/main/resources/assets/modId/textures/items/file.png

Ist that wrong?

Because it's not working. In the Item Class i coded it like that:

 

 

  Reveal hidden contents

 

 

Pleas help me :D

 

Mike

Posted
  On 5/25/2014 at 5:42 PM, diesieben07 said:

You need to use "modId:textureName" when registering your textures. It will automatically select between the blocks and items folder.

How do you mean that?

Please write the code line ;)

Thanks

Posted
  On 5/25/2014 at 5:54 PM, diesieben07 said:

Where you register your texture (registerIcon).

Ok, first of all thanks for your support :D

Ok, i corrected my code in the Item Class but theres the same problem.

My Item Class looks now like this:

 

  Reveal hidden contents

 

 

Thanks ;)

Mike

Posted
  On 5/25/2014 at 6:23 PM, Zer0HD2 said:

Can you post your main class?

Here is my Main Class:

 

  Reveal hidden contents

 

 

Thanks

Mike

Posted
  On 5/25/2014 at 7:06 PM, diesieben07 said:

ModID has to be all lowercase.

Ok, now i changed the ModID to lowercase.

But it's not working...

Here ist the Item Class:

 

  Reveal hidden contents

 

 

And here is the Main Class:

 

  Reveal hidden contents

 

 

Thanks

Mike

Posted
  On 5/25/2014 at 7:19 PM, diesieben07 said:

Is your Texture at

src/main/resources/assets/mike/textures/items/greendiamondGreendDiamond.png

? Because that's what you point it to.

Also: Only create Items in preInit.

My textures are in this folder structure.

But if I try to create a Item in preInit. it says that there are not permitted modifieres. And if I delete them it isnt working..

So, could you please write me exactly what I should do? :D

Thanks

Mike

 

Posted

You people overlook the simplest things sometimes.

 

Mike, in your item class

@SideOnly(Side.CLIENT)
   public void registerIcons(IconRegister par1IconRegister) {
      this.itemIcon = par1IconRegister.registerIcon("mike:greendiamond" + texture);
   }

should be

@SideOnly(Side.CLIENT)
   public void registerIcons(IconRegister par1IconRegister) {
      this.itemIcon = par1IconRegister.registerIcon("mike:" + texture);
   }

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted
  On 5/25/2014 at 8:26 PM, dude22072 said:

You people overlook the simplest things sometimes.

 

Mike, in your item class

@SideOnly(Side.CLIENT)
   public void registerIcons(IconRegister par1IconRegister) {
      this.itemIcon = par1IconRegister.registerIcon("mike:greendiamond" + texture);
   }

should be

@SideOnly(Side.CLIENT)
   public void registerIcons(IconRegister par1IconRegister) {
      this.itemIcon = par1IconRegister.registerIcon("mike:" + texture);
   }

 

Ok, I changed the code. But, it's not working. Please help me :D

Here is my code:

The Main Class

 

  Reveal hidden contents

 

 

My Item Class:

 

  Reveal hidden contents

 

The textures are located at:

src\main\resources\assets\mike\textures\items

I called it one time "GreenDiamond" and one time "greendiamondGreenDiamond"

 

Mike

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.