minecraft:wearable for you with a switch.Get GodCraftOverview
minecraft:wearable is an item component: it goes in the components object of a custom item. Lets the item be worn in an equipment slot, such as a helmet or boots. Combine it with an attachable in the resource pack so it shows on the player.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
slot | EquipmentSlot | none | The slot it goes in, for example "slot.armor.head". Any slot other than a hand sets the stack size to 1. |
protection | integer | 0 | Armor points the item gives while worn.Range: 0 to … |
hides_player_location | boolean | false | When true, wearing it hides the player from locator maps and the locator bar. |
Example
Inside the components object of BP/items/<name>.json (values are the defaults or placeholders):
BP/items/<name>.json
{
"minecraft:wearable": {
"slot": {},
"protection": 0,
"hides_player_location": false
}
}