Custom Enchantment Definition
Defines a custom enchantment with modular mechanics
Campos
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting
|
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName | String | — | Display name of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimumCost | Cost | — | Minimum cost when enchanting
|
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
maximumCostCostCost (2)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptyCustomEnchantmentDefinitionEnchantmentDefinitionCustomEnchantmentDefinition (14)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting |
maximumCost | EnchantmentDefinition.Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
mechanics | List<EnchantmentMechanic> | empty | List of modular mechanics for this enchantment |
EnchantmentDefinition (18)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
treasureChanceInt0tradeChanceInt0cooldownEnabledBooleantruecooldownDurationofSeconds(1)criteriaList<Criteria>emptyinactiveTriggersList<Ref<TriggerableEntry>>emptyactiveTriggersList<ActiveTriggers>emptyActiveTriggers (2)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
level | Int | 1 | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
maximumCostEnchantmentDefinition.CostEnchantmentDefinition (18)
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName | String | — | Display name of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimumCost | Cost | — | Minimum cost when enchanting
|
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
maximumCostCostCost (2)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptyCustomEnchantmentDefinitionEnchantmentDefinitionCustomEnchantmentDefinition (14)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting |
maximumCost | EnchantmentDefinition.Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
mechanics | List<EnchantmentMechanic> | empty | List of modular mechanics for this enchantment |
EnchantmentDefinition (18)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
treasureChanceInt0tradeChanceInt0cooldownEnabledBooleantruecooldownDurationofSeconds(1)criteriaList<Criteria>emptyinactiveTriggersList<Ref<TriggerableEntry>>emptyactiveTriggersList<ActiveTriggers>emptyActiveTriggers (2)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
level | Int | 1 | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptyCustomEnchantmentDefinitionEnchantmentDefinitionCustomEnchantmentDefinition (14)
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName | String | — | Display name of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
minimumCost | EnchantmentDefinition.Cost | — | Minimum cost when enchanting
|
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
maximumCostEnchantmentDefinition.CostEnchantmentDefinition (18)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
enchantmentLore | String | — | Lore shown on items for this enchantment |
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') |
supportedItems | List<Material> | empty | Items that support this enchantment |
anvilCost | Int | 1 | Cost in an anvil to combine |
maxLevel | Int | 1 | Maximum level of the enchantment |
weight | Int | 1 | Weight used for random selection |
minimumCost | Cost | — | Minimum cost when enchanting |
maximumCost | Cost | — | Maximum cost when enchanting |
activeSlots | List<EnchantSlot> | empty | Equipment slots the enchantment is active in (empty = armor + hands)Valores:ANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODY |
exclusiveWith | List<Ref<RegisteredEnchantment>> | empty | Enchantments that cannot coexist with this one on the same item |
treasureChance | Int | 0 | Chance (0-100%) for this enchantment to appear as a book in generated loot chests |
tradeChance | Int | 0 | Chance (0-100%) for librarian villagers to sell this enchantment instead of a vanilla book trade |
cooldownEnabled | Boolean | true | Whether active triggers use a cooldown |
cooldown | Duration | ofSeconds(1) | Cooldown between active triggers |
criteria | List<Criteria> | empty | Criteria that must match for triggers to run |
inactiveTriggers | List<Ref<TriggerableEntry>> | empty | Triggers fired when the enchantment becomes inactive |
activeTriggers | List<ActiveTriggers> | empty | Triggers fired while the enchantment is active. Each entry specifies the level. |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptytreasureChanceInt0tradeChanceInt0mechanicsList<EnchantmentMechanic>emptyEnchantmentMechanic (6)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
event | EnchantmentEvent | PLAYER_ATTACK | The event that triggers this mechanicValores:PLAYER_ATTACKPLAYER_DEFENDBLOCK_BREAKBOW_SHOOTPROJECTILE_HITITEM_CONSUMEPLAYER_DEATHPLAYER_INTERACTARMOR_EQUIPITEM_DAMAGEFALL_DAMAGEENVIRONMENTAL_DAMAGEPLAYER_MOVESHIELD_BLOCKSNEAKSPRINT |
criteria | List<Criteria> | empty | Conditions that must be met to execute the actions |
actions | List<Ref<TriggerableEntry>> | empty | Actions executed when criteria are met |
clientSideEffects | List<Ref<TriggerableEntry>> | empty | Client-side only effects (particles, sounds) executed via packets |
runOnLevel | Int | 0 | Level required to run this mechanic. 0 means all levels. |
chance | Int | 100 | Chance to trigger this mechanic (0-100%). |
EnchantmentDefinition (18)
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
displayName | String | — | Display name of the enchantment | ||||||||||||
enchantmentLore | String | — | Lore shown on items for this enchantment | ||||||||||||
nameColor | String | gray | Color of the enchantment name on items (MiniMessage tag, e.g. 'gray' or '#aaaaaa') | ||||||||||||
supportedItems | List<Material> | empty | Items that support this enchantment | ||||||||||||
anvilCost | Int | 1 | Cost in an anvil to combine | ||||||||||||
maxLevel | Int | 1 | Maximum level of the enchantment | ||||||||||||
weight | Int | 1 | Weight used for random selection | ||||||||||||
minimumCost | Cost | — | Minimum cost when enchanting
|
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
maximumCostCostCost (2)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
base | Int | 0 | — |
perLevel | Int | 0 | — |
activeSlotsList<EnchantSlot>emptyANYHANDMAINHANDOFFHANDARMORHEADCHESTLEGSFEETBODYexclusiveWithList<Ref<RegisteredEnchantment>>emptytreasureChanceInt0tradeChanceInt0cooldownEnabledBooleantruecooldownDurationofSeconds(1)criteriaList<Criteria>emptyinactiveTriggersList<Ref<TriggerableEntry>>emptyactiveTriggersList<ActiveTriggers>emptyActiveTriggers (2)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
level | Int | 1 | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
treasureChanceInt0tradeChanceInt0mechanicsList<EnchantmentMechanic>emptyEnchantmentMechanic (6)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
event | EnchantmentEvent | PLAYER_ATTACK | The event that triggers this mechanicValores:PLAYER_ATTACKPLAYER_DEFENDBLOCK_BREAKBOW_SHOOTPROJECTILE_HITITEM_CONSUMEPLAYER_DEATHPLAYER_INTERACTARMOR_EQUIPITEM_DAMAGEFALL_DAMAGEENVIRONMENTAL_DAMAGEPLAYER_MOVESHIELD_BLOCKSNEAKSPRINT |
criteria | List<Criteria> | empty | Conditions that must be met to execute the actions |
actions | List<Ref<TriggerableEntry>> | empty | Actions executed when criteria are met |
clientSideEffects | List<Ref<TriggerableEntry>> | empty | Client-side only effects (particles, sounds) executed via packets |
runOnLevel | Int | 0 | Level required to run this mechanic. 0 means all levels. |
chance | Int | 100 | Chance to trigger this mechanic (0-100%). |
Campos comunes de TypeWriter (displayName)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
displayName | String | — | Display name of the enchantment |
How to use it
This is the mechanic-based definition. It has the same identity, item, cost, loot and trade fields as Enchantment Definition, and replaces the trigger fields with mechanics.
Each mechanic has:
event: the game event it reacts to (see the list on the main page).criteria: conditions that must match for it to run.actions: the entries to run, such as Lifesteal or Vein Miner. They must be written for the same event.clientSideEffects: entries run right after the actions, for visual effects such as Client Particle Effect.runOnLevel: the level at which it runs.0runs at every level; any other value must equal the current level exactly.chance: percentage chance, from 0 to 100.
The level used is the highest level of the enchantment found on the main hand, off-hand or armor. To scale an effect with the level, add one mechanic per level.