> For the complete documentation index, see [llms.txt](https://yowsef-development.gitbook.io/yowsef-development-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yowsef-development.gitbook.io/yowsef-development-docs/untitled/configuration/enchanting-table-config.md).

# enchanting table config

```yaml
# ============================================================
# PrimeEnchants  |  Enchanting Table Integration
# enchanting_table.yml
# ============================================================
#
# Controls which custom enchants can appear when a player
# uses an enchanting table.
#
# KEY DESIGN GUARANTEES
# ─────────────────────
#  • Vanilla enchantments are fully preserved. Custom enchants
#    are ADDED to the item AFTER vanilla enchants are applied.
#  • Custom enchants respect the XP-level cost the player paid
#    (min_table_level / max_table_level per enchant).
#  • A per-item cap (max_custom_enchants_per_item) prevents
#    runaway stacking with large enchant pools.
#  • The candidate list is cached per material type and only
#    rebuilt on reload — safe for 150+ enchant pools.
#
# HOW DEFAULTS WORK
# ─────────────────
#  Any registered enchant NOT listed under "enchantments:"
#  uses the values in "defaults:". Only list enchants that need
#  non-default settings.
# ============================================================

enchanting_table:
  enabled: true

  settings:
    # When true, vanilla enchantments are applied first and
    # custom enchants are stacked on top. Turning this false
    # would require cancelling vanilla enchants — NOT supported.
    include_vanilla_enchants: true

    # Treasure-flagged enchants (marked treasure: true below)
    # are excluded from the enchanting table unless this is true.
    allow_treasure_enchants: false

    # When false, enchants that conflict with existing enchants
    # on the item are skipped. See VillagerInjection docs for
    # the built-in conflict list.
    allow_conflicting_enchants: false

    # Maximum number of distinct custom enchants that can be
    # applied in a single enchanting-table operation.
    # Prevents players from getting 10+ custom enchants in one click.
    max_custom_enchants_per_item: 2

  level_system:
    # Minimum XP-level cost the player must select before any
    # custom enchant can be injected. Keeps level-1 enchants vanilla.
    min_enchant_level: 5

    # Maximum XP-level cost cap for scaling enchant levels.
    # At this level the highest-weight enchants have their best
    # chance of appearing. Vanilla cap is 30.
    max_enchant_level: 30

  # ─── Global Defaults ──────────────────────────────────────
  # Applied to any enchant NOT listed under "enchantments:".
  defaults:
    enabled: true
    weight: 10
    min_table_level: 1
    max_table_level: 30
    # -1 = use the enchant's own configured max level
    max_level: -1

  # ─── Per-Enchant Overrides ────────────────────────────────
  enchantments:
    # (Overrides removed for brevity in docs, see full file in plugin folder)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yowsef-development.gitbook.io/yowsef-development-docs/untitled/configuration/enchanting-table-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
