Modify Item Wearable
Modifies whether the entity holding the power can equip and item in the specified equipment slots.
Type ID: kaya:modify/item/wearable
Info
This type provides the following context parameters when an item is about to be equipped into an equipment slot:
| Parameter | Description |
|---|---|
kaya:worn_item |
The item that will be put into an equipment slot. |
Format
| Field | Type | Default | Description |
|---|---|---|---|
slots |
Slots Map | Determines which items to allow in which equipment slots. |
Warning
This type does not support the active_condition field.
Slots Map
An object that contains key-value pairs where the keys are names of equipment slots and its values are conditions.
Format
| Field | Type | Default | Description |
|---|---|---|---|
offhand |
Condition | optional | If specified, items which fulfill this condition can be equipped in the offhand equipment slot. |
feet |
Condition | optional | If specified, items which fulfill this condition can be equipped in the feet equipment slot. |
legs |
Condition | optional | If specified, items which fulfill this condition can be equipped in the legs equipment slot. |
chest |
Condition | optional | If specified, items which fulfill this condition can be equipped in the chest equipment slot. |
head |
Condition | optional | If specified, items which fulfill this condition can be equipped in the head equipment slot. |
body |
Condition | optional | If specified, items which fulfill this condition can be equipped in the body equipment slot. |
saddle |
Condition | optional | If specified, items which fulfill this condition can be equipped in the saddle equipment slot. |
Example
{
"type": "kaya:modify/item/wearable",
"head": {
"type": "kaya:any_of",
"conditions": [
{
"type": "kaya:item_matches_ingredient",
"ingredient": "#minecraft:head_armor",
"item": "worn_item"
},
{
"type": "kaya:item_matches_ingredient",
"ingredient": "#c:glass_blocks",
"item": "worn_item"
}
]
}
}
This example allows any item included in either the #minecraft:head_armor or #c:glass_blocks item tags to be equipped to the head equipment slot.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |