Enchantment Config

A complete outline of every enchantment configuration option, with defaults and descriptions.

This is not a plug-and-play enchantment, it is a complete reference of every element an enchantment config might contain.

# ══════════════════════════════════════════════════════════════════════════════
#  Full enchantment example — every supported field with REQUIRED / OPTIONAL notes
#
#  Place files like this in:
#    plugins/MythicMobs/packs/<yourpack>/Enchantments/
#
#  Multiple enchantments per file are allowed. The top-level key is the enchant
#  ID. Bare IDs (no colon) are namespaced automatically using the datapack name
#  set in config.yml. Explicit namespaces (namespace:key) are used as-is.
# ══════════════════════════════════════════════════════════════════════════════

# REQUIRED — enchantment ID. Bare IDs get the configured datapack namespace.
#            Use namespace:key to pin it (e.g. mythicenchants:enchantment_id).
enchantment_id:

  # REQUIRED — display name shown in item lore. Supports & color codes.
  Display: '<white>Example Enchantment'

  # OPTIONAL — extra lore line(s) shown below the enchant name. Defaults to empty.
  Description: '<gray>The enchantment with all the options!'

  # OPTIONAL — rarity tier. Controls enchanting-table weight grouping and
  #            display color. One of: COMMON, UNCOMMON, RARE, VERY_RARE.
  #            Defaults to COMMON.
  Rarity: COMMON

  # OPTIONAL — minimum enchantment level (for grading/display). Defaults to 1.
  MinLevel: 1

  # REQUIRED (effectively) — maximum level. Defaults to 1 if omitted.
  MaxLevel: 1

  # OPTIONAL — which equipment slots activate this enchant's skills.
  #            List one or more: MAINHAND, OFFHAND, HEAD, CHEST, LEGS, FEET, ALL.
  #            Defaults to [ALL].
  ValidSlots:
    - ALL

  # OPTIONAL — datapack item filter controlling which items can receive this
  #            enchant. Accepts tag refs (#minecraft:enchantable/sword) or
  #            individual item keys (minecraft:diamond_sword).
  #            Defaults to #minecraft:enchantable/weapon.
  SupportedItems: '#minecraft:enchantable/weapon'

  # OPTIONAL — items shown as "primary" in the datapack (affect enchanting table
  #            cost weighting in vanilla logic). Usually left empty.
  PrimaryItems: []

  # OPTIONAL — XP level cost per merge step in an anvil. Defaults to 1.
  AnvilCost: 1

  # OPTIONAL — tag memberships. Unnamespaced tags get the plugin's default
  #            namespace. Tags drive conflict resolution and loot table filtering.
  Tags:
    - minecraft:on_random_loot  # appears in general vanilla chest/mob loot
    - exclusive_damage          # example custom exclusion group

  # OPTIONAL — enchantments (or #tag refs) that conflict with this one.
  #            Conflicting enchants cannot coexist on the same item.
  ConflictingEnchants:
    - minecraft:sharpness
    - minecraft:smite
    - minecraft:bane_of_arthropods

  # OPTIONAL — behaviour flags block. All three default to false/true as shown.
  Options:
    Enabled: true # whether available/obtainable or not and whether skills work
    Cursed: false # Signifies whether a curse or no
    Treasure: false # Signifies whether counted as a treasure enchantment
    RandomLoot: true # Can be generated on random loot
    Tradeable: true # can be traded by librarians
    TradedEquipment: true # on traded equipment or no
    MobSpawnEquipment: true # on mob equipment
    TooltipOrder: 42 # weighted order of tool tip from 1 being the top
  Enchanting:
    # OPTIONAL — relative selection weight (higher = more likely to appear).
    #            Defaults to 1
    Weight: 1

    # OPTIONAL — minimum modified enchantment level needed to roll this enchant.
    #            Scalar shorthand: MinCost: 15  (Base only, PerLevel defaults to 0).
    #            Full form shown below.
    MinCost:
      Base: 15        # minimum cost at level 1
      PerLevel: 9     # added per level above 1 (so level 3 min = 15 + 9*2 = 33)

    # OPTIONAL — maximum modified enchantment level that can still produce this
    #            enchant. Same scalar / full-form rules as MinCost.
    MaxCost:
      Base: 65
      PerLevel: 0

    # OPTIONAL — whether this enchant can appear as a named promise hint in the
    #            table tooltip. Defaults to true.
    Promised: true

    # OPTIONAL — whether this enchant can be enchanted onto books in the table.
    #            Defaults to true, so only needs to be defined to prevent this.
    BookOffer: true 

    # OPTIONAL — reagent(s) required in the lapis slot to unlock this enchant.
    #            Omit entirely (or omit the list) = vanilla lapis only.
    #            Single entry "ALL" = any reagent accepted.
    #            Each entry is one of:
    #              LAPIS_LAZULI          — plain vanilla lapis
    #              <crucible-id>         — MythicCrucible item internal name
    #              <model-string-path>   — custom model data string key
    Reagent:
      - LAPIS_LAZULI
      - moondust        # also accepts this Crucible reagent
      - nexo:sunshard   # can read any item model string on lapis items

    # OPTIONAL — MythicMobs conditions evaluated when the table is opened.
    #            This enchant only appears as an option when all conditions pass.
    Conditions:
      - (night || dusk)   # time-of-day condition
      - outside           # player must be under open sky

  # OPTIONAL — MythicMobs skill lines. Omit the block if this enchant has no
  #            active skills (e.g. a pure datapack effect enchant).
  #
  #  Format:  mechanic{attributes} @targeter ~onTrigger
  #
  #  <math:EXPR> or for meta/sudo skills <math.EXPR> substitutes a computed value. Available variables:
  #    enchant_level, enchant_maxlevel
  #    player_health, player_max_health
  #    target_health, target_max_health
  #    fall_distance, 
  #    damage  (only on ~onDamaged)
  #    item_attack  (only on ~onAttack)
  #  Underscore and dash forms are both accepted (enchant_level = enchant-level).
  Skills:
    # Deal bonus damage scaled to enchantment level
    - damage{a=<math:enchant_level*1.5>} @trigger ~onAttack

    # Apply a timed weakness effect to the target, duration scales with level
    - potion{type=WEAKNESS;d=<math:enchant_level*40>;amp=0} @trigger ~onAttack

    # Reduce incoming projectile damage proportional to current level
    - reducedamage{a=<math:damage*0.05*enchant_level>;cause=PROJECTILE} @self ~onDamaged

    # Apply an attribute bonus while the item is equipped / remove it on unequip
    - enchantattribute{attribute=ATTACK_DAMAGE;a=<math:enchant_level*0.5>;op=ADD_NUMBER;mode=APPLY} @self ~onEquip
    - enchantattribute{attribute=ATTACK_DAMAGE;mode=REMOVE} @self ~onUnequip
Updated Aug 19, 2026