How do I get my custom model to accept multiple textures at once?
If you have a custom model that you have created, you may want to reuse that model but with a different texture. Luckily, there is a way to do that without creating a near identical model for every texture.
As I said before, I could make a 2nd model file with the new texture instead of the blank texture, however if I then want to change what the model for all the slates, I'd have to edit every texture's model file. I don't know about you, but I certainly didn't want to do that. So instead I modified my model file to look like this:
Can you see what I did? Just in case you didn't, I removed the
"textures" element. By itself, this model cannot be used in game now, unless you want a purple and black look.
"parent" element points towards where I placed the model (
spell_base) within the
model/item folder. This is where I moved the
"textures" element to. (It's important to note, that within the
arrow.json file, you must change the
"model": file to point to the new
spell_blank.json instead of the base model.)
If you reload the resource pack, you should see that the model once again has it's texture. For this, it should look like nothing has changed.
The green highlighted text is what points to the 2nd model, while the final
"predicate" element means that any other number points back at the original arrow.
As you can see, the game has mapped both the
spell_blank onto the
spell_base model, but if I decide to change what the base model looks like, I need only change the root (Or parent) file.
When I was making this resource pack I couldn't find any help online, so when I worked it out by myself I wanted to write the answer that I couldn't find. If you were looking for the same answers I was, I hope this helps. If you know more than me and notice there's ways to make this easier, please let me know!