Modify Accessory (Entity Action Type)
Acts on the accessories the entity is wearing.
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)
Fields
| Field | Type | Default | Description |
|---|---|---|---|
slots | array of String or objects | [] | Which accessory slots to look at. A string is slot, group/slot, or group/slot/index — for example "ring", "hand/ring", "hand/ring/0". An empty list means every slot. |
item_condition | Item Condition | optional | Only act on accessories matching this. |
item_action | Item Action | optional | Runs on each matching accessory. |
entity_action | Entity Action | optional | Runs on the wearer, once, if anything matched. |
limit | Integer | 0 | Stop after this many matches. 0 means no limit. |
unequip | Boolean | false | Remove each matching accessory after acting on it. |
Examples
Damage every equipped accessory by one point:
{
"type": "apoli:modify_accessory",
"item_action": { "type": "apoli:damage", "amount": 1 }
} Strip one iron accessory and tell the wearer, which is the shape a “disarm” ability wants:
{
"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" }
}
} Needs an accessory mod — Trinkets, Accessories or Curios, depending on your loader. These types do not exist without one, so a pack using them must depend on it.