English
Parts and Slots
plugins/EmakiAccessory/parts.yml: how to define accessory parts, how one part expands into the window's cells, and what orphaned slots are. plugins/EmakiAccessory/parts.yml defines every available part, and pages/*.yml then decides which parts each page enables. You define each part once here and any page can reference it
Full Example
yaml
parts:
necklace:
count: 1
display_name: "<gold>Necklace</gold>"
icon: "LIGHT_GRAY_STAINED_GLASS_PANE"
ring:
count: 2
display_name: "<gold>Ring</gold>"
icon: "LIGHT_GRAY_STAINED_GLASS_PANE"
belt:
count: 1
display_name: "<gold>Belt</gold>"
icon: "LIGHT_GRAY_STAINED_GLASS_PANE"
charm:
count: 2
display_name: "<gold>Charm</gold>"
icon: "LIGHT_GRAY_STAINED_GLASS_PANE"Fields
The top-level key is parts, and every key under it is a part id; the key name must be legal (see the next section). A missing parts section leaves no part active and logs accessory.parts_section_missing; a file that fails to load logs accessory.parts_load_failed
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
parts.<partId> | object | Yes | — | the key must match ^[a-z0-9_]+$ and must not end with _<number> | Part definition node; an illegal id is skipped (accessory.part_id_illegal) |
parts.<partId>.count | integer | No | 1 | ≥ 1; below 1 the part is skipped (accessory.part_count_invalid) | How many slot instances this part expands into |
parts.<partId>.display_name | string | No | "" | — | Part display name; MiniMessage is supported. Used only as the fallback name of the empty-slot placeholder item, i.e. when the matching GUI cell declares no item.components |
parts.<partId>.icon | string | No | "" | — | Material/item source of the empty-slot placeholder item. Used when the matching GUI cell declares no item.source; a cell left fully empty degrades to a barrier item |
parts.<partId>.durability_deduction | boolean | No | true | true / false | Whether accessories of this part may lose durability. It only matters for items that carry a durability ceiling (items with a ceiling of 0 are never deducted); deduction additionally requires durability.enabled in the main config |
Example: expand rings to 3 cells and change the placeholder name and material
yaml
parts:
ring:
count: 3
display_name: "<gold>Ring</gold>"
icon: "LIGHT_GRAY_STAINED_GLASS_PANE"Slot Instance Expansion
Every part expands into count slot instances whose ids are <partId>_<index>, with the index starting at 1
Take the example above: the ring part is configured with count: 2 and expands into ring_1 and ring_2:
| Part | count | Expanded slot instances |
|---|---|---|
necklace | 1 | necklace_1 |
ring | 2 | ring_1, ring_2 |
belt | 1 | belt_1 |
charm | 2 | charm_1, charm_2 |
Part Id Naming Constraints
The key is normalized first (trimmed, lowercased, spaces turned into underscores), after which it may only use lowercase letters, digits and underscores and must not end with _<number> — that form collides with slot instance ids (writing ring_2 would clash with the second cell of the ring part)
Invalid ids are rejected with an accessory.part_id_illegal warning; the plugin will not rename them for you
When two parts expand into the same slot instance id, the later part is skipped entirely with an accessory.part_instance_conflict warning
Pages and the Window Must Match
After you edit parts.yml, two steps remain:
- Add the part to the
partslist of apages/*.ymlfile, or it belongs to no page and players never see it - Every expanded slot needs a cell with
type: "accessory_slot"and the same key name in the layout the page uses (thegui/*.ymlreferenced bygui_template), or the player cannot use that slot
When several pages reference the same part, each page stores its accessories separately with no overwriting; only the enabled page produces attributes, skills, and set piece counts
If you shrink count, delete a part, or remove a part from a page's parts, existing accessories become orphans, recovered through an orphan_slot or /eacc retrieve <page>. See GUI Template and Configuration
yaml
slots:
ring_1:
slots: [12]
type: "accessory_slot"
ring_2:
slots: [13]
type: "accessory_slot"Orphaned Slots
You can shrink count or delete a part and no data is deleted: accessories left in a vanished slot become "orphans" and appear in the window's orphan_slot area for the player to retrieve
Once retrieved they cannot be put back. Orphaned accessories also never count toward set piece totals, so removing a part from the configuration can lower the count reported by set events