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.

[1.10.2] Change item texture based on NBT values

Featured Replies

Posted

I'm programatically combining textures to create items. Unfortunately there's too many items in the end (thousands) and it makes forge take forever to load. So I think I'll have to use NBT values (can't use damage because it's a tool). Seems like you add the NBT value when returning the itemstack from the recipe, but how do I then change the texture based on that value?

You would still need to register each image so that it can be baked into a model.

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.

  • Author

There are the two times when it takes an unacceptably long time during loading. Are you saying even if I used NBT data and didn't register each as it's own item in the game, these steps would still have to happen?

 

 

bXx35xi.png

AWefGaF.png

 

Those are both ModelLoader tasks.

Which bake models.

Which you would still have to do. So yes.

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.

  • Author

Any ideas on ways around it? Tinkers Construct has far more combinations than me yet they load almost instantly.

TiC almost certainly uses multiple pieces to create their items.

e.g. there's a wooden shaft, a metal blade, and a leather grip. So the item model is actually 3 models combined.

They only register 3* images to get baked into models, then the item uses all three when created.

 

Also, TiC is on GitHub: https://github.com/SlimeKnights/TinkersConstruct

 

*Obviously there are more, the "3" in this context is the example three.

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.

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.