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

Hello! I'm working with an item that changes its texture based off of NBT data. The texture changes on the held item, but the texture in the hotbar is constantly that dreaded purple/black "texture not found". What concept am I missing here? I thought the texture used for rendering in-hand were extracted from the 2D icon in the inventory (for items). The code for the item is here: https://goo.gl/93HpTr. Thanks in advance!

 

EDIT: I should also mention I'm using IntelliJ as my IDE, in case that matters for some reason...

Able to differentiate the difference of a sum and an integral.

I had a similar problem in my mod. In the constructor for my item, I included setTextureName("modname:texturename"). However, the icon in the inventory won't change to reflect the in-hand texture.

 

modname is the name of the package containing your mod classes. For vanilla textures, use "minecraft"

texturename is the name of your texture's image file without .png

  • Author

I'm not sure the question is clear: I want the item's inventory icon to be changing with the hand-rendered item. The hand-rendered image *is* changing, but the  inventory image is not. I have updated my code to reflect what you (McNutty) have said, but the issue still persists as I expected. (The updated code still exists at https://goo.gl/93HpTr.) So, in short, I still have not solution to this issue.

 

Here are two screenshots of the issue if clarification is needed:

Able to differentiate the difference of a sum and an integral.

Figured it out. Override getItemIndex, return IIcon that you want. That is the method that controls the inventory icon.

  • Author

Awesome sauce! That worked perfectly! Thanks a ton!

Able to differentiate the difference of a sum and an integral.

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

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.