Modify Accessory (Entity Action Type)
Runs an action on the accessories the entity currently has equipped, optionally filtering which ones and how many.
Type ID: apoli:modify_accessory (alias apoli:modify_trinket)
note
This type only exists when an accessory mod is installed: Trinkets, Accessories or Curios, depending on your loader. A pack that uses it must depend on one.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
slots | Array of slots | [] | The accessory slots to look in. A string is slot, group/slot or group/slot/index, such as "ring", "hand/ring" or "hand/ring/0". An empty list means every slot. |
item_condition | Item Condition Type | optional | Only acts on accessories that pass it. |
item_action | Item Action Type | optional | Runs on each matching accessory. |
entity_action | Entity Action Type | optional | Runs once on the wearer, if anything matched. |
limit | Integer | 0 | Stops after this many matches. 0 means no limit. |
unequip | Boolean | false | Removes each matching accessory after acting on it. |
Examples
{
"type": "apoli:modify_accessory",
"item_action": { "type": "apoli:damage", "amount": 1 }
}This damages every equipped accessory by one point.
{
"type": "apoli:modify_accessory",
"limit": 1,
"unequip": true,
"item_condition": {
"type": "apoli:ingredient",
"ingredient": { "tag": "c:ingots/iron" }
},
"entity_action": {
"type": "apoli:text",
"text": { "translate": "mypack.accessory.stripped" }
}
}This takes off one iron accessory and tells the wearer, which is the shape a disarming ability needs.