

Custom Item Models
Setup and Compatibility
This modification only needs to be installed on the server side - players without this mod can connect and use all provided features. It also works in singleplayer when installed on the client.
How It Works
To see examples of compatible resource packs, navigate to the tutorial
directory.
Rename a name tag on an anvil to the string that you would typically put inside the minecraft:custom_model_data={strings:[]}
array.
Diamond before applying a name tag with the title ruby
:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond"
}
Then apply this name tag to the item using a smithing table.
Diamond after applying a name tag with the title ruby
:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond",
components: {
"minecraft:custom_model_data": {
strings: ["ruby"]
}
}
}
Equipment Features
This mod also modifies the minecraft:equippable
component for items like armor pieces and elytras.
For example, Diamond Helmet
before applying a name tag with the title crown
:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond_helmet"
}
and after applying a name tag with the title crown
:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond_helmet",
components: {
"minecraft:custom_model_data": {
strings: ["crown"]
},
"minecraft:equippable": {
equip_sound: "minecraft:item.armor.equip_diamond",
slot: "head",
asset_id: "cim:crown"
}
}
}
IMPORTANT: Be aware that asset_id
will always be under the cim
namespace due to how vanilla code operates. You can see examples in the tutorial
directory.
You don't have to use the cim
namespace for item models, only for armor rendering.
License
This mod is available under the MIT license. Feel free to study its code and incorporate it into your own projects.