Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[SOLVED][1.15] What replaces IModel.retexture ?


Recommended Posts

I'm updating a few multipart blocks that use the texture of the blocks they where crafted with, but have gotten stuck on how to retexture the models.


While the sub models are combining and rendering correctly (minus textures) I figure listing what I've done may help.


Switched from IModelLoader to IModelLoader, and redirected the json files.

Had to switch to IModelGeometry from IUnbakedModel, and with the loss of getDependencies the extra models are now loaded via ModelLoader.addSpecialModel during FMLClientSetupEvent.


I'm still using a IBakedModel just called from IModelGeometry.bake now. 

In the getQuads method I'm pulling the a list of submodels and textures from the IModelData (which is set in the tileentity)

The needed submodels are looped over getting each IUnbakedModel via ModelLoader.instance().getModelOrMissing   (was using ModelLoaderRegistry.getModel before)

At this point I retextured the model via IModel.retexture then baked the submodel, but currently am only baking the model.

Finally adding all the quads and returning the list


The only thing I haven't found the replacement for is retexture.

I have the model's resource location, and a Map of keys(string) and textures(resource location in string form)




I have a working solution, don't believe its the best one, but its something for now.

Just created a wrapper around BlockModel that overrides resolveTextureName.

Edited by ShetiPhian
Added info
Link to comment
Share on other sites

  • 1 month later...

Ran into this issue again, 

The wrapper works perfectly with json models, but it doesn't work on obj models.


Is there a way to retexture an obj model that I'm just not seeing?



for anyone wondering, I forgot to add the # in front of the texture name in the mtl file.

Edited by ShetiPhian
Link to comment
Share on other sites

  • ShetiPhian changed the title to [SOLVED][1.15] What replaces IModel.retexture ?

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.

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.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.