Custom Armor
Custom armor is a normal EcoItem with the vanilla equippable component, which makes any item wearable and renders a fully custom texture on the body, with no shaders, trims, or restrictions on the base material. The same component covers elytra, mob armor, saddles, and harnesses. This page covers adding that wearable behaviour on top of a standard item.
Quick start
Open
/plugins/EcoItems/items/and create a file for each piece, e.g.emerald_helmet.yml.Set up the
item:section as you would for any item (see How to Make an Item), with atexturefor the inventory icon.Add the
minecraft:equippablecomponent with aslotand anasset_id, e.g.ecoitems:emerald.Create the equipment asset at
pack/assets/ecoitems/equipment/emerald.jsoninside the EcoItems plugin folder.Put the layer textures in
pack/assets/ecoitems/textures/entity/equipment/.Run
/ecoitems reloadto rebuild the pack.Give yourself the piece with
/ecoitems give <player> emerald_helmetand wear it to confirm the texture renders.
The structure of a piece of armor
| Part | What it controls |
|---|---|
| Item | The base item, inventory icon, and recipe, identical to any EcoItem |
minecraft:equippable | The slot it's worn in and the equipment asset it renders |
minecraft:attribute_modifiers | Armor points and other stats while worn |
| Equipment asset | Which textures render on the body |
# === Item: a normal EcoItem ===
item:
item: paper # Any base material works
name: "<g:#89E59D>Emerald Helmet</g:#37C6BA>"
texture: item/default/armors/emerald_helmet # The inventory icon
# === The wearable behaviour, as vanilla components ===
components:
"minecraft:max_stack_size": 1
"minecraft:max_damage": 437 # Durability
"minecraft:equippable":
slot: "head" # head, chest, legs, or feet
asset_id: "ecoitems:emerald" # pack/assets/ecoitems/equipment/emerald.json
"minecraft:attribute_modifiers":
- type: "minecraft:armor"
id: "ecoitems:emerald_helmet_armor"
amount: 3 # Armor points
operation: "add_value"
slot: "head"
slot: helmet # The libreforge slot, for effects
Item
The item: section is the same as any other EcoItem; see How to Make an Item. Give pieces durability with minecraft:max_damage, plus minecraft:max_stack_size: 1. The top-level slot is the libreforge slot the item's effects run in.
The components
minecraft:equippable is the vanilla component (1.21.2+) that makes an item wearable. Beyond slot and asset_id, it supports equip_sound, dispensable, swappable, camera_overlay, and allowed_entities, all in the vanilla Data component format.
Armor values come from minecraft:attribute_modifiers on the matching slot, exactly like vanilla armor.
Equipment asset
The equipment asset defines which textures render on the body. It lives at its natural vanilla location in the pack folder:
// pack/assets/ecoitems/equipment/emerald.json
{
"layers": {
"humanoid": [{ "texture": "ecoitems:emerald" }],
"humanoid_leggings": [{ "texture": "ecoitems:emerald" }]
}
}
With the layer textures at:
pack/assets/ecoitems/textures/entity/equipment/humanoid/emerald.pngfor the helmet, chestplate, and boots (the classiclayer_1)pack/assets/ecoitems/textures/entity/equipment/humanoid_leggings/emerald.pngfor the leggings (layer_2)
One asset covers the whole set, so every piece points at the same asset_id.
Elytra
Elytra work the same way, with a wings layer in the equipment asset:
// pack/assets/ecoitems/equipment/magic_elytra.json
{
"layers": { "wings": [{ "texture": "ecoitems:magic_elytra" }] }
}
Give the elytra a broken-texture to change its icon when it runs out of durability; see Item States.
Mob armor, saddles, and harnesses
The same component covers gear for mobs, with different slots and layer types:
| Gear | slot | Layer type | Version |
|---|---|---|---|
| Wolf armor | body | wolf_body | 1.21.2+ |
| Horse armor | body | horse_body | 1.21.2+ |
| Llama carpet | body | llama_body | 1.21.2+ |
| Saddle | saddle | <entity>_saddle (one layer per rideable mob) | 1.21.5+ |
| Happy ghast harness | body | happy_ghast_body | 1.21.6+ |
Use allowed_entities to restrict what can wear it:
# items/ruby_wolf_armor.yml
item:
item: wolf_armor
name: "<g:#FA7CBB>Ruby Wolf Armor</g:#F14658>"
texture: item/mob/ruby_wolf_armor
components:
"minecraft:equippable":
slot: "body"
asset_id: "ecoitems:ruby_wolf"
allowed_entities: "minecraft:wolf"
A custom saddle's equipment asset declares a layer per rideable entity (pig_saddle, horse_saddle, camel_saddle, and so on), all pointing at your texture. Copy the shipped pack/assets/ecoitems/equipment/ruby_saddle.json as a starting point.
Where to go next
The base item: How to Make an Item for the shared item, display, and recipe fields.
Item states: Item States for broken elytra and other state models.
The pack: Resource Packs for how textures reach players.
Repairing: Repairable Items to let players repair armor at an anvil.