If an item has a tag, say, for example, a sword is enchanted with fire_aspect, we could change the texture of it with a resource pack, without touching the swords without fire_aspect. Also, enchanted books would be able to have different textures with a resource pack. It is possible applying a texture according to their damage.
I see it coming as following:
{
"parent": "item/handheld",
"textures": {
"layer0": "item/diamond_sword"
},
"overrides": [
{
"predicate": {
"damaged": 1,
"damage": 0.95
},
"model": "item/diamond_sword/diamond_sword_2"
},
{
"predicate": {
"enchantments": [
{
"lvl": 1,
"id": "minecraft:fire_aspect"
}
]
},
"model": "item/diamond_sword/diamond_sword_1"
}
]
}
The second "predicate" defines what enchantment it needs to have to redirect to model "item/diamond_sword/diamond_sword_1". The first "predicate" redirects to another model if the damage is above 0.95.
I know this is already possible with OptiFine, but why not add it to vanilla Minecraft? Textures according to tags could also be implemented into the game itself, without needing to make a resource pack.
And, as a matter of fact, this is already in-game, but only for the "tipped_arrows", they have a different texture, depending on the potion they have.
Please sign in to leave a comment.
0 Comments