-
Notifications
You must be signed in to change notification settings - Fork 1
Penchantment Definitions
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 |
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.
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.