Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

Does .getIconFromDamage(0) work?

If you really want help, give that modder a thank you.

 

Modders LOVE thank yous.

  • Author

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?

  • Author

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.

  • Author

Because he doesn't texture the blocks, he only textures the full biped.

 

+ he's using skins, not item textures.

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...

Sorry for necrobumping this thread, but I was wondering how I'd do this in 1.12, because Item.getTextureLocation() doesn't exist anymore.

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.

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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.