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

ideally without optifine if possible

Continue to help post