In this video i show you how to add custom items with name dependance in vanilla minecraft 1.21.5+ using GitHub.
Websites :
Github - https://misode.github.io/assets/item/
Content of the file (Don't forget to change the "ITEM NAME" "CUSTOM MODEL" and "BASE ITEM", the file won't work as it is) :
{
"model": {
"type": "minecraft:select",
"property": "minecraft:component",
"component": "minecraft:custom_name",
"cases": [
{
"when": "ITEM NAME",
"model": {
"type": "minecraft:model",
"model": "item/CUSTOM ITEM"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/BASE ITEM"
}
}
}