Hello
To make players see your custom CrateKey models you have to force players to download the texture pack that uses your server.
Otherwise, players might not see your custom models.
I'm going to give an example with a tripwire hook.
Here's the code so you can actually see if there's something wrong in your code:
assets=>minecraft=>models=>item=>
tripwire_hook.json \/
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:block/tripwire_hook"
},
"overrides": [
{
"predicate": {
"custom_model_data": 123456
},
"model": "minecraft:item/crate_key"
}
]
}
assets=>minecraft=>models=>item=>
crate_key.json \/
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/crate_key"
}
}
Note: Don't forget to create the crate key's texture(textures=>items=>).
Second Note: You can just change "require-resource-pack" to true, which will force the players to use the resource pack.
Here's a website that you could use to create the gui:
https://stevertus.com/tools/gui/give code of the crate key(Template): /give @s minecraft:tripwire_hook{"CustomModelData":123456, display:{"Name":'{"text": "Crate Key", "italic": false}'},CanPlaceOn:["minecraft:void_air"],HideFlags:16,tripwire_hook:1b}