custom_enchantment_definition
Defines a custom enchantment with modular mechanics — misc entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | custom_enchantment_definition |
| Type | Misc |
| Color | Blue |
| Icon | material-symbols:auto-fix-high |
Fields
| Field | Type | Description |
|---|---|---|
displayName | String | Display name of the enchantment |
enchantmentLore | String | Lore shown on items for this enchantment |
nameColor | String | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | Items that support this enchantment |
anvilCost | Int | Cost in an anvil to combine |
maxLevel | Int | Maximum level of the enchantment |
weight | Int | Weight used for random selection |
minimumCost | EnchantmentDefinition.Cost | Minimum cost when enchanting |
maximumCost | EnchantmentDefinition.Cost | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | Equipment slots the enchantment is active in (empty = armor + hands) |
exclusiveWith | List<Ref<RegisteredEnchantment>> | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
mechanics | List<EnchantmentMechanic> | List of modular mechanics for this enchantment |
Usage Example
- entry: custom_enchantment_definition
name: "Defines a custom enchantment with modular mechanics"
displayName: ""
enchantmentLore: ""
nameColor: ""
supportedItems: []
anvilCost: 0
maxLevel: 0
weight: 0
minimumCost: ""
maximumCost: ""
activeSlots: []
exclusiveWith: []
treasureChance: 0
tradeChance: 0
mechanics: []