1. Wiki
  2. /Items
  3. /Attachables

Attachables

Show a 3D model when a player holds or wears a custom item: the attachable file in the resource pack.

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.png

The 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:

FieldWhat it does
materialsHow the model is drawn. Armor uses armor, other held models usually entity_alphatest.
texturesThe model's texture, without .png.
geometryThe model. Vanilla armor shapes like geometry.humanoid.armor.helmet work, or your own .geo.json.
render_controllersWhich textures and materials go together.
scriptsMolang 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.json and use its geometry.<name> here.

Items: Resource pack

We use cookies to improve your experience and analyse site traffic. Learn more