In this guide you will make a Ruby Chestplate and learn how to turn it into a full set of four pieces. Armor is the first item where the behavior pack and the resource pack each do a big job: the BP decides how much it protects, and the RP decides how it looks on the player's body, not only in the inventory.
This guide builds on Your first custom item. If icons, textures and lang files are new to you, read that first.
The quick way: GodCraft
GodCraft makes all four pieces at once, including the worn look, so you skip the trickiest file of this guide.
- Open the Workshop and add an Armor to your add-on.
- Paint the icons and the worn texture in the pixel editor.
- Set protection, durability and repair items for each piece.
- Tap Export and try the set on in game.
Ready to see the files? Here we go.
How armor works
Each armor piece needs three things:
| Part | Pack | What it does |
|---|---|---|
| Item file | BP | Which slot it goes in, how much it protects, durability |
| Icon | RP | The small picture in the inventory |
| Attachable | RP | The 3D model and texture drawn on the body when worn |
We use the namespace myname. Replace it with your own everywhere.
By hand
Step 1: the item file
{
"format_version": "1.26.30",
"minecraft:item": {
"description": {
"identifier": "myname:ruby_chestplate",
"menu_category": {
"category": "equipment",
"group": "minecraft:itemGroup.name.chestplate"
}
},
"components": {
"minecraft:icon": {
"textures": {
"default": "myname_ruby_chestplate"
}
},
"minecraft:display_name": {
"value": "item.myname:ruby_chestplate.name"
},
"minecraft:max_stack_size": 1,
"minecraft:wearable": {
"slot": "slot.armor.chest",
"protection": 7
},
"minecraft:durability": {
"max_durability": 500
},
"minecraft:enchantable": {
"slot": "armor_torso",
"value": 12
},
"minecraft:repairable": {
"repair_items": [
{
"items": ["myname:ruby"],
"repair_amount": "query.max_durability * 0.25"
}
]
},
"minecraft:tags": {
"tags": ["minecraft:is_armor"]
}
}
}
}The important parts:
minecraft:wearableis what makes it armor.slotis where it goes andprotectionis how many armor points it adds to the bar above your health. Each full armor icon is 2 points.minecraft:durabilityis how many hits it can absorb before breaking.minecraft:enchantableuses the armor slot names, so Protection and the other armor enchantments can go on it.minecraft:repairablelets players fix it on an anvil with a ruby.minecraft:tagsmarks it as armor.minecraft:max_stack_sizeis 1. Wearing it in an armor slot forces a stack of 1 anyway, but saying it is clearer.
Step 2: the other three pieces
Copy the chestplate file three times and change these values in each copy:
| Piece | slot (wearable) | slot (enchantable) | Diamond protection, for comparison |
|---|---|---|---|
| Helmet | slot.armor.head | armor_head | 3 |
| Chestplate | slot.armor.chest | armor_torso | 8 |
| Leggings | slot.armor.legs | armor_legs | 6 |
| Boots | slot.armor.feet | armor_feet | 3 |
Remember to change the identifier, icon and display name too, and pick the matching creative group (helmet, leggings or boots instead of chestplate).
Step 3: the worn texture
Armor on the body uses a different, bigger texture than the icon. It is laid out like the vanilla armor files: a 64x32 PNG that wraps around the body. Vanilla splits each set into two layers:
- Layer 1 (
ruby_1.png): helmet, chestplate and boots. - Layer 2 (
ruby_2.png): leggings.
64x32 PNG: the helmet, chestplate and boots parts64x32 PNG: the leggings partsThe easiest way to get the layout right is to start from the vanilla diamond_1.png and diamond_2.png and paint over them. See Pixel textures for painting tips.
Step 4: the attachable
An attachable tells the game what to draw on the player when the item is worn or held. Create an attachables folder in your resource pack:
{
"format_version": "1.10.0",
"minecraft:attachable": {
"description": {
"identifier": "myname:ruby_chestplate",
"materials": {
"default": "armor",
"enchanted": "armor_enchanted"
},
"textures": {
"default": "textures/models/armor/ruby_1",
"enchanted": "textures/misc/enchanted_actor_glint"
},
"geometry": {
"default": "geometry.humanoid.armor.chestplate"
},
"scripts": {
"parent_setup": "variable.chest_layer_visible = 0.0;"
},
"render_controllers": ["controller.render.armor"]
}
}
}Line by line:
identifiermust be the item's ID exactly. This is how the game links the attachable to the item.materialsand theenchantedtexture make the purple shimmer show up when the armor is enchanted.textures.defaultis your worn texture, without.png.geometryuses the built-in vanilla armor model, so you do not need to build a 3D model.parent_setuphides the vanilla armor layer for that body part, so nothing draws on top of yours.render_controllersuses the vanilla armor controller.
For the other pieces, change three values:
| Piece | geometry | parent_setup | Texture |
|---|---|---|---|
| Helmet | geometry.humanoid.armor.helmet | variable.helmet_layer_visible = 0.0; | ruby_1 |
| Chestplate | geometry.humanoid.armor.chestplate | variable.chest_layer_visible = 0.0; | ruby_1 |
| Leggings | geometry.humanoid.armor.leggings | variable.leg_layer_visible = 0.0; | ruby_2 |
| Boots | geometry.humanoid.armor.boots | variable.boot_layer_visible = 0.0; | ruby_1 |
Step 5: icons and names
Add one icon per piece to item_texture.json (inside texture_data), and save the 16x16 icons in RP/textures/items/:
"myname_ruby_helmet": { "textures": "textures/items/ruby_helmet" },
"myname_ruby_chestplate": { "textures": "textures/items/ruby_chestplate" },
"myname_ruby_leggings": { "textures": "textures/items/ruby_leggings" },
"myname_ruby_boots": { "textures": "textures/items/ruby_boots" }item.myname:ruby_helmet.name=Ruby Helmet
item.myname:ruby_chestplate.name=Ruby Chestplate
item.myname:ruby_leggings.name=Ruby Leggings
item.myname:ruby_boots.name=Ruby BootsTest it
- Load the packs into a world (see Export and install).
- Run /give for each piece, for example
/give @s myname:ruby_chestplate. - Put it on and check the armor bar. Press F5 on PC, or change the camera view in settings, to see it from the outside.
Invisible armor?
If the armor bar goes up but you cannot see the armor, the BP is fine and the attachable is the problem. Check that the attachable identifier matches the item ID and that the texture path is right.
When something goes wrong
| What you see | Most likely cause |
|---|---|
| You cannot put it on | minecraft:wearable is missing or the slot is misspelled |
| It is invisible when worn | The attachable identifier or texture path is wrong |
| It looks scrambled | The worn texture is not laid out like the vanilla 64x32 armor texture, or the piece uses the wrong layer |
| Pink and black on the body | The texture path in the attachable points to a file that does not exist |
More fixes are in Troubleshooting. Next, let players craft the set in Crafting and furnace recipes, or pair it with a Ruby Sword.