Skip to content

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

FieldTypeRequiredDefaultAllowed valuesDescription
parts.<partId>objectYes—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>.countintegerNo1≥ 1; below 1 the part is skipped (accessory.part_count_invalid)How many slot instances this part expands into
parts.<partId>.display_namestringNo""—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>.iconstringNo""—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_deductionbooleanNotruetrue / falseWhether 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:

PartcountExpanded slot instances
necklace1necklace_1
ring2ring_1, ring_2
belt1belt_1
charm2charm_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:

  1. Add the part to the parts list of a pages/*.yml file, or it belongs to no page and players never see it
  2. Every expanded slot needs a cell with type: "accessory_slot" and the same key name in the layout the page uses (the gui/*.yml referenced by gui_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