How to use item texture variants in Minecraft Java?
Solution 1:
To summarize the video in David Callanan's answer: You can use the CustomModelData nbt tag. In the .json file of the model you are editing, include one or more override models. Example:
{
"parent": "item/handheld",
"textures": {
"layer0": "item/carrot_on_a_stick"
},
"overrides": [
{ "predicate": { "custom_model_data": 1}, "model": "item/carrot_on_a_stick/1" },
{ "predicate": { "custom_model_data": 2}, "model": "item/carrot_on_a_stick/2" }
]
}
This is an example where the texture of a carrot on a stick is changed. This is replacing the normal text in the carrot_on_a_stick.json . The models being accessed are in a folder next to carrot_on_a_stick.json called carrot_on_a_stick . The models are respectively called 1.json and 2.json . You'll probably want to have some knowledge of Minecrafts json modeling. For that, I recommend this site. To give yourself one of the custom-textured items in-game, use /give @s minecraft:<item_name>{CustomModelData:<number>} . Sorry about any poor formatting; I'm new.