Jump to content

[1.6.4] Get the Resource/Resource location of any item.


Recommended Posts

Posted

Is it possible to get the Resource I.e texture of any item without making a specific reference inside the class?

 

Preferably i'd need to be able to get the resource or ResourceLocation of any item, be it vanilla or a mod item.

 

If i cannot do this, is there an easy way to get the associated .png of an Item.

 

I've tried looking around in the RenderManager but haven't had much luck.

Posted

yes thanks that does allow me to get the icon.

 

My real need is to get a direct path to the .png file, do you know how i can get that from an Icon?

Posted

Well i'm basically making a 3D printer, i need direct access to the .png's to be able to get each pixel of the images colour, which will be used to create a dynamic texture for a model that represents one pixel. These pixel blocks will be slowly built up by the printer, Similar to the Sync mod builds its player modes, except i want mine to be coloured in relation to the item being printed.

 

I don't want to link directly through to assets, as i will have to make a long list containing the data of which .png links to which Item, and if I want to dynamically add mod items, that isn't going to work.

Posted

Item#getTextureName()?

 

Then pass that to new ResourceLocation()

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • 3 years later...
Posted

Items and blocks no longer have textures, they now have models.

 

Use RenderItem#getItemModelWithOverrides to get the model for an item. 

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
5 minutes ago, Choonster said:

Items and blocks no longer have textures, they now have models.

 

Use RenderItem#getItemModelWithOverrides to get the model for an item. 

How can I display them in world? I wanted to draw a quad and then show an item texture in it... How can I do that with models?

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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