Can I use one model but have the texture change depending on the item?

Started by PrinceAllart on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I use one model but have the texture change depending on the item?

Is it possible to have one model and then have the textures change for different items? 

 

For example, I'm making a door in Blockbench. I have the model of the door, assign Sprice texture and then export it as a json. Then, I replace the material with an Oak texture and export it again as a different json file.

 

I was wondering if there was any way for me to only import the model and then have the main texture change depending on the item? That way I don't have hundreds of models uploaded into MCreator when all I'm doing is changing a texture.

 

This is my first mod, so if I missed something really basic, I'm sorry.

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The model and the texture…
Wed, 12/07/2022 - 18:51

The model and the texture are separate things. Once you save the model and import it into MCreator it can be reused by multiple blocks. The texture is saved and added here

https://www.mediafire.com/view/p4ozbfkfmpcdzqy/image.png/file

The model is used here

https://www.mediafire.com/view/7y5ifbx0ppxtfsz/image%25282%2529.png/file

you can use different textures for the same models like this

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks so much for the help!…
Wed, 12/07/2022 - 22:59

Thanks so much for the help! What if my model uses two textures?

When I import the model, MCreator asks which texture to use:

 

With that said, I can't figure out how to change them for different items without importing another .json model and assigning it different textures at import.

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually, I figured it out…
Wed, 12/07/2022 - 23:18

Actually, I figured it out. I just have to edit the code of each item. Thanks again for the help! It steered me in the right direction.