Skip to content

Penchantment Definitions

ThePotatoArchivist edited this page Mar 30, 2026 · 5 revisions

Each enchantment has a "penchantment definition" that defines how Penchant handles it.

Field Type Behavior Fallback
progress_cost_factor Enchantment Cost Affects the required progress to level up an enchantment, see Levelup Requirement max_cost
experience_cost integer How many levels it costs to apply the enchantment in the reworked enchanting table anvil_cost
book_requirement integer How many books are needed to apply the enchantment in the reworked enchanting table 2 * min_cost(1) - 5

Datapack

Penchantment definitions are placed with the same identifier in the penchant/definition registry. For example, to modify the definition of minecraft:aqua_affinity you would create the file data/minecraft/penchant/definition/aqua_affinity.json with the following contents:

{
  "progress_cost_factor": {
    "base": 75,
    "per_level": 25
  },
  "experience_cost": 4,
  "book_requirement": 20
}

If an enchantment does not have a matching penchantment definition, it will use the fallbacks described above using values from the regular enchantment definition.

Levelup Requirement

The number of uses required to level up an enchantment to the next level is calculated by dividing the equipment's max durability by 100, clamping that value between 1 and 8, and then multiplying it by the progress_cost_factor for the next level.

$\text{clamp}\left(\left\lfloor\frac{\text{max\_durability}}{100}\right\rfloor, 1, 8\right) \cdot \text{progress\_cost\_factor}\left(\text{next\_level}\right)$

Clone this wiki locally