How do I make the texture for an item change depending on custom model data?

Ideally without optifine if possible

Continue to help post