Skip to main content

enchantment_definition

Defines a custom enchantment — misc entry.

Entry Information

PropertyValue
Entry IDenchantment_definition
TypeMisc
ColorPurple
Iconmaterial-symbols:auto-fix

Fields

FieldTypeDescription
displayNameStringDisplay name of the enchantment
enchantmentLoreStringLore shown on items for this enchantment
nameColorStringColor of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa')
supportedItemsList<Material>Items that support this enchantment
anvilCostIntCost in an anvil to combine
maxLevelIntMaximum level of the enchantment
weightIntWeight used for random selection
minimumCostCostMinimum cost when enchanting
maximumCostCostMaximum cost when enchanting
activeSlotsList<EnchantSlot>Equipment slots the enchantment is active in (empty = armor + hands)
exclusiveWithList<Ref<RegisteredEnchantment>>Enchantments that cannot coexist with this one on the same item
treasureChanceIntChance (0-100%) for this enchantment to appear as a book in generated loot chests
tradeChanceIntChance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade
cooldownEnabledBooleanWhether active triggers use a cooldown
cooldownDurationCooldown between active triggers
criteriaList<Criteria>Criteria that must match for triggers to run
inactiveTriggersList<Ref<TriggerableEntry>>Triggers fired when the enchantment becomes inactive
activeTriggersList<ActiveTriggers>Triggers fired while the enchantment is active. Each entry specifies the level.

Usage Example

- entry: enchantment_definition
name: "Defines a custom enchantment"
displayName: ""
enchantmentLore: ""
nameColor: ""
supportedItems: []
anvilCost: 0
maxLevel: 0
weight: 0
minimumCost: ""
maximumCost: ""
activeSlots: []
exclusiveWith: []
treasureChance: 0
tradeChance: 0
cooldownEnabled: false
cooldown: ""
criteria: []
inactiveTriggers: []
activeTriggers: []