Pular para o conteúdo principal

custom_enchantment_definition

Defines a custom enchantment with modular mechanics — misc entry.

Entry Information

PropertyValue
Entry IDcustom_enchantment_definition
TypeMisc
ColorBlue
Iconmaterial-symbols:auto-fix-high

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
minimumCostEnchantmentDefinition.CostMinimum cost when enchanting
maximumCostEnchantmentDefinition.CostMaximum 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
mechanicsList<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: []