An attachable tells the game which 3D model to draw when an item is held or worn. Without one, a held item is drawn as its flat icon. Armor always needs one, because the worn armor is a model on the player.
Where it goes
Resource pack
RP/
attachables/
ruby_helmet.json
models/
entity/
ruby_helmet.geo.json
textures/
models/
ruby_armor.pngThe file
The identifier must be the same as the item's identifier in the behavior pack.
RP/attachables/ruby_helmet.json
{
"format_version": "1.10.0",
"minecraft:attachable": {
"description": {
"identifier": "wiki:ruby_helmet",
"materials": {
"default": "armor",
"enchanted": "armor_enchanted"
},
"textures": {
"default": "textures/models/ruby_armor",
"enchanted": "textures/misc/enchanted_actor_glint"
},
"geometry": {
"default": "geometry.humanoid.armor.helmet"
},
"scripts": {
"parent_setup": "variable.helmet_layer_visible = 0.0;"
},
"render_controllers": ["controller.render.armor"]
}
}
}The fields are the same ones a client entity file uses:
| Field | What it does |
|---|---|
materials | How the model is drawn. Armor uses armor, other held models usually entity_alphatest. |
textures | The model's texture, without .png. |
geometry | The model. Vanilla armor shapes like geometry.humanoid.armor.helmet work, or your own .geo.json. |
render_controllers | Which textures and materials go together. |
scripts | Molang run when the item is drawn. parent_setup above hides the vanilla helmet layer. |
Tips
- One attachable per item. A full armor set is four files.
- The armor texture is one sheet for the whole set, laid out like vanilla
textures/models/armor/diamond_1.png. - Draw your model in a model editor, export it as
.geo.jsonand use itsgeometry.<name>here.