Jump to content

[1.12/1.13] Load textures dynamically


Brickmotion

Recommended Posts

I'm planning to implement an item wich, based on its NBT values, shows additional components on its texture (meaning that when an NBT variable is set to a certain value, another layer of the texture is loaded, if its set to another value, a different layer is loaded). However, as far as I understand it, to acomplish this I would have to create a model for every variation of this item possible, which the way I plan it would result in thousends, if not ten thousends of models I have to create (I want to have three seperate NBT variables that can be freely mixed, being able to take on at least 16 variants each, resulting in a minimum of 16³ = 4,096 variants). As making individual models is clearly not an option, I was wondering if there was a way to do this dynamically, meaning that I have one model that can somehow control this. I tried to figure out how banners implement a similar thing, but as those are tile entities, I don't know if this would work for items as well. Apparently Tinker's Construct is able to do something like this with freely combinable tools, but I don't know how this was achieved there.

Link to comment
Share on other sites

Wrong subforum.

Banners use vanilla's hacky TE based rendering. They are not rendered as other items are so they are not something you can base your rendering on.

You have 2 options:

  1. Use forge's blockstates with sub-models. Using sub-models you can just define 16*3 variants instead of 163.
  2. Use custom BakedModels with a custom ICustomModelLoader. I think this is what Tinkers does.
Link to comment
Share on other sites

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.