Enchant Data

EnchantData

EnchantData: is an optional section inside any enchantment YAML that lets you declaratively define vanilla Minecraft datapack effect components — the same JSON that lives in data/<namespace>/enchantment/<key>.json. Instead of writing raw JSON you write YAML; MythicEnchants validates it and generates the correct datapack file at startup.

Any parse error (typo in a key, missing required field, etc.) is printed to the server log and blocks that enchantment from being written to the datapack entirely until fixed. Other enchantments are unaffected.

Minecraft wiki references


Table of Contents

  1. Version compatibility
  2. How it fits together
  3. Value providers — how numbers are expressed
  4. Requirements / predicates — conditional gating
  5. Value effect components — scalar boosts
  6. Bare value components — crossbow & trident timing
  7. Entity effect components — on-hit, on-tick, etc.
  8. Entity effect types — what happens
  9. Attribute effects — stat modifiers
  10. Flag components — boolean toggles
  11. Special components — sounds
  12. Full examples

Version compatibility

MythicEnchants detects the running server version at startup and generates datapacks at the correct pack format automatically.

Server version Pack format Notes
1.21.11 94 All documented effect components, including damage_immunity.
26.1.x 101.1 All documented effect components.
26.2 107.1 All documented components.
26.3 121.0 Version-sensitive requirements, number providers, potion tests, and block states are converted automatically.

Before upgrading an existing server, see upgrade preparation.

Predicate key format

Minecraft changed how sub-keys inside entity_properties predicates are named in pack format 107:

Key purpose Pre-107 (1.21.11, 26.1) 107+ (26.2, 26.3)
Entity flags flags minecraft:flags
Location check location minecraft:location
Entity type type minecraft:entity_type
Type-specific data type_specific minecraft:type_specific

Always write predicates in the 26.2 namespaced form. MythicEnchants automatically rewrites them to the correct bare-key form when generating datapacks for servers on format < 107. You never need to maintain two versions of a predicate.

# Write this on any server version — MythicEnchants handles the rest
requirements:
  condition: minecraft:entity_properties
  entity: this
  predicate:
    minecraft:flags:
      is_on_fire: true

Existing condition: syntax remains supported. MythicEnchants emits condition for 1.21.11 through 26.2 and type for 26.3. Nested requirements are converted too, including those generated by native mechanics. Existing bare IDs in damage-type tags checks receive the required # prefix on 26.3. Block-state provider names and Name / Properties fields are also adapted for the target server.

Both condition: and the new type: spelling are accepted. There is one deliberate distinction: a bare damage-type tags[].id under condition: retains its old tag meaning. Under type:, it means a direct damage-type ID, following 26.3. A quoted '#minecraft:is_fire' explicitly means a tag with either spelling on all supported versions. Direct damage-type IDs and lists need 26.3.

Additional 26.3 conversions

Authored feature Generated behavior
A list under requirements An explicit all_of, preserving AND behavior.
block_state_property with block / properties match_block with blocks / state on 26.3. A single-block test can also convert back.
value_check with range int_value_check with test on 26.3, preserving the old integer evaluation and rounding.
Context number providers inside requirements Converts legacy scoreboard scaling and integer/float provider differences; visits nested inline conditions.
minecraft:potion_contents: [minecraft:water] in item predicates Wraps the list in potions on 26.3, including equipment and item-container tests. A potions-only object also converts back.
Block-state providers and particle block states Converts provider names, Name / Properties, and supported compact block-state forms.

The new float_value_check, potion effect collections, inline context arithmetic, copy_properties / random_block block-state providers, and newer block predicates can be used when generating for 26.3. Features without an equivalent on an older target produce a validation error identifying that target. The enchantment is skipped, so a requirement is never silently removed. With datapack overlays enabled, all selected versions must support the definition.

Predicate and context number-provider references cannot be used in enchantments. Minecraft loads enchantments before those reloadable registries, including on 26.3. Use inline definitions instead of a string ID, tag reference, or minecraft:reference. Block-state provider references are different: on 26.3 they can point to an existing worldgen/block_state_provider entry supplied by a datapack. The rule_based block-state provider requires at least 26.1; it is rejected for 1.21.11 because that version has no matching provider.

These conversions cover the 26.3 format changes that apply to EnchantData. Minecraft still validates registry IDs, the fields accepted by each effect, and which context parameters an enchantment component supplies.

Components not available on older servers

These are skipped with a server log warning if the running server is below their minimum pack format. The enchantment still loads normally — only the datapack component is omitted.

Component Minimum version
post_piercing_attack 1.21.11 (pack format 94) — added for Lunge
location_changed 1.21.11 (pack format 94) — Frost Walker pattern

How it fits together

my_enchant:
  Display: '&6My Enchant'
  MaxLevel: 3
  ValidSlots: [MAINHAND]
  SupportedItems: '#minecraft:enchantable/sword'

  EnchantData:
    # Everything under here is datapack generation
    damage:
      value:
        type: linear
        base: 0.5
        perLevel: 0.5

  Skills:
    - ... # normal MythicEnchants skill lines still work alongside EnchantData

EnchantData: and Skills: are independent — you can use both, either, or neither.


Value providers

A value provider describes how a number is calculated, usually based on enchantment level. Used anywhere a numeric field appears (value effects, attribute amounts, entity effect parameters, etc.).

linear

Grows linearly with level. base is the value at level 1; perLevel is added for each level above 1.

value:
  type: linear
  base: 1.0
  perLevel: 0.5
# level 1 = 1.0, level 2 = 1.5, level 3 = 2.0

Shorthand (same thing, no type: needed):

base: 1.0
perLevel: 0.5

constant

Fixed value regardless of level.

value:
  type: constant
  value: 2.5

Bare number shorthand (only on top-level effect keys, not inside nested sections):

fishing_luck_bonus: 1.0

levels_squared

Value = (level - 1)² + added. Vanilla uses this for Protection.

value:
  type: levels_squared
  added: 1.0
# level 1 = 1, level 2 = 2, level 3 = 5, level 4 = 10

uniform

Random value uniformly distributed in [min_inclusive, max_exclusive), re-rolled each time the effect fires. Vanilla uses this for Soul Speed's escape-sound pitch.

value:
  type: uniform
  min_inclusive: 0.6
  max_exclusive: 1.0

lookup

Returns a fixed value per level from a list. If the level exceeds the list length, fallback is used.

value:
  type: lookup
  values: [1.0, 2.5, 4.5, 7.0]
  fallback: 7.0   # also accepts a nested value provider

clamped

Clamps another value provider to a [min, max] range.

value:
  type: clamped
  value:
    type: linear
    base: 0.0
    perLevel: 2.0
  min: 0.0
  max: 6.0

fraction

Divides one value provider by another. Vanilla uses this for Sweeping Edge.

value:
  type: fraction
  numerator:
    type: linear
    base: 1.0
    perLevel: 1.0
  denominator:
    type: linear
    base: 2.0
    perLevel: 1.0
# level 1 = 1/2, level 2 = 2/3, level 3 = 3/4

Bare numbers work for numerator/denominator too:

value:
  type: fraction
  numerator: 1.0
  denominator: 3.0

exponent

Raises base to the power of power. Both accept nested value providers or bare numbers.

value:
  type: exponent
  base: 2.0
  power:
    type: linear
    base: 1.0
    perLevel: 1.0

formula (math)

Evaluates a math expression once per level (1 through MaxLevel) and bakes the results into a minecraft:lookup table — vanilla's JSON format has no arbitrary-formula value type, so MythicEnchants resolves the expression ahead of time at datapack generation rather than at runtime. Uses the same expression engine (exp4j) and function set as <math:...> skill-line tokens — see the class doc on MenchMathParser for the full operator/function list (min, max, clamp, sqrt, sin, round, lerp, etc.).

Available variables: level (current enchantment level), max_level (the enchant's MaxLevel).

value:
  type: formula
  expression: "1 + sqrt(level) * 2"
# level 1 = 3, level 2 = 3.83, level 3 = 4.46, ...

math is accepted as an alias for type: formula. A parse/eval error at any level is logged and that level falls back to 0.


Requirements / predicates

Conditional effect entries can include an optional requirements: map or list of maps. Write Minecraft predicate syntax as YAML. MythicEnchants converts the known version differences and rejects unsupported conversions; Minecraft validates the remaining predicate fields and context parameters when it loads the datapack.

See: Predicate

damage:
  value:
    base: 2.0
    perLevel: 1.0
  requirements:
    condition: minecraft:entity_properties
    entity: this
    predicate:
      minecraft:flags:
        is_on_fire: true

Multiple conditions — wrap them in minecraft:all_of:

requirements:
  condition: minecraft:all_of
  terms:
    - condition: minecraft:random_chance
      chance: 0.25
    - condition: minecraft:weather_check
      thundering: true

Always write predicates in the 26.2 namespaced form (minecraft:flags, minecraft:location, minecraft:entity_type, etc.). MythicEnchants automatically rewrites them to the correct bare-key form for servers running pre-107 pack formats. See Version compatibility for details.

Two things to watch for:

  • For damage-type tag checks, prefer a quoted '#minecraft:is_fire'. Legacy bare IDs under condition: also retain their tag meaning. Under the new type: spelling, bare IDs mean direct damage types and require 26.3.
  • Numeric sub-fields inside requirements: (e.g. random_chance's chance) do not go through MythicEnchants' value-provider parser — write vanilla's real field names directly (per_level_above_first, not perLevel; minecraft:linear, not a bare type: linear shorthand) if you need a level-scaled value there.
requirements:
  condition: minecraft:damage_source_properties
  predicate:
    tags:
      - id: '#minecraft:is_fire'       # explicit tag, supported on every target
        expected: true

requirements:
  condition: minecraft:random_chance
  chance:
    type: minecraft:enchantment_level
    amount:
      type: minecraft:linear           # full vanilla field names, not the value-provider shorthand
      base: 0.15
      per_level_above_first: 0.15

Value effect components

These are conditional arrays — each entry has an effect (the number) and an optional requirements predicate. Multiple entries are evaluated in order; all matching entries are summed.

See: Value effect components

Key What it affects
damage Extra damage dealt
damage_protection Damage reduction (Protection family)
armor_effectiveness How much armor helps against this damage source
knockback Knockback strength on hit
smash_damage_per_fallen_block Bonus damage per block fallen before impact (Density)
equipment_drops Chance modifier for mob equipment drops (Looting; Fortune/Silk Touch's "extra drops" behavior is loot-table apply_bonus/special-casing, not this component)
ammo_use Ammo consumption modifier (Infinity uses mode: set to force 0)
projectile_piercing How many entities a projectile can pierce (Piercing)
projectile_count Number of projectiles fired (Multishot)
projectile_spread Spread angle of projectiles in degrees
block_experience XP dropped from breaking blocks (Silk Touch uses mode: set to force 0)
mob_experience XP dropped from killing mobs
repair_with_xp Item repair rate from XP (Mending)
item_damage Durability damage dealt to the item
trident_return_acceleration Loyalty return speed
fishing_time_reduction Reduction in fishing wait time (Lure)
fishing_luck_bonus Luck bonus for fishing loot table (Luck of the Sea)

Effect mode

Every entry may set an optional mode: — how the value combines with the base game value. Defaults to add if omitted.

Mode Datapack type Field used for the number Vanilla example
add (default) minecraft:add value Sharpness damage
set minecraft:set value Silk Touch (block_experience: 0), Infinity (ammo_use: 0)
multiply minecraft:multiply value (serialised as factor) Mending (repair_with_xp ×2)
remove_binomial minecraft:remove_binomial value (serialised as chance) Unbreaking (binomial chance to negate durability damage)
block_experience:
  mode: set
  value:
    type: constant
    value: 0.0

repair_with_xp:
  mode: multiply
  value:
    type: constant
    value: 2.0

item_damage:
  mode: remove_binomial
  value:
    type: fraction
    numerator:
      base: 1.0
      perLevel: 1.0
    denominator:
      base: 2.0
      perLevel: 1.0

Single entry (most common)

damage:
  value:
    type: linear
    base: 0.5
    perLevel: 0.5

With requirements

damage_protection:
  value:
    type: levels_squared
    added: 1.0
  requirements:
    condition: minecraft:entity_properties
    entity: this
    predicate:
      minecraft:flags:
        is_on_fire: true

Multiple gated entries

damage:
  entries:
    - value:
        type: constant
        value: 2.0
      requirements:
        condition: minecraft:random_chance
        chance: 0.5
    - value:
        base: 0.5
        perLevel: 0.25

Bare number shorthand

Expands to a constant value with no requirements:

fishing_luck_bonus: 2.0

Bare value components

These two components take a single bare value object in the datapack JSON — not an array of conditional entries. You cannot add multiple gated entries; use them for a simple scalar override.

See: crossbow_charge_time, trident_spin_attack_strength

crossbow_charge_time

Changes crossbow charge time. Negative values make it faster (vanilla Quick Charge: −0.25 per level).

crossbow_charge_time:
  value:
    type: linear
    base: -0.25
    perLevel: -0.25

Shorthand:

crossbow_charge_time: -0.75

trident_spin_attack_strength

Strength of the trident spin attack (Riptide).

trident_spin_attack_strength:
  value:
    type: linear
    base: 1.5
    perLevel: 0.75

Entity effect components

These fire in response to game events. Each entry specifies who carries the enchantment (enchanted), who is affected (affected), the effect type, and an optional requirements predicate.

See: Entity effect components

Component When it fires
post_attack After a melee attack connects
tick Every game tick while equipped in a valid slot
hit_block When a projectile hits a block
projectile_spawned When a projectile is fired
post_piercing_attack After a piercing projectile passes through an entity
location_changed When the enchanted entity moves to a new block position (Frost Walker, Soul Speed) — has no enchanted/affected, always this

enchanted / affected values

Value Meaning
attacker The entity holding the enchanted item
victim The entity being attacked
damaging_entity The direct source of damage (e.g. the arrow itself)

Not all combinations are valid for every component — hit_block has no affected, for example.

Single entry

post_attack:
  enchanted: attacker
  affected: victim
  effect:
    type: apply_mob_effect
    to_apply: minecraft:poison
    min_duration: 3.0
    max_duration: 3.0
    min_amplifier: 0.0
    max_amplifier: 0.0
  requirements:
    condition: minecraft:random_chance
    chance: 0.15

Multiple entries

post_attack:
  entries:
    - enchanted: attacker
      affected: victim
      effect:
        type: ignite
        duration: 4.0
    - enchanted: attacker
      affected: victim
      effect:
        type: apply_mob_effect
        to_apply: minecraft:slowness
        min_duration: 2.0
        max_duration: 2.0
        min_amplifier: 1.0
        max_amplifier: 1.0
      requirements:
        condition: minecraft:random_chance
        chance: 0.3

Entity effect types

These go inside the effect: block of an entity effect entry.

See: Entity effects

apply_mob_effect

Applies a potion effect to the target.

See: Effect IDs

effect:
  type: apply_mob_effect
  to_apply: minecraft:poison        # required — effect ID or list of IDs
  min_duration: 3.0                 # seconds (default 5.0)
  max_duration: 3.0
  min_amplifier: 0.0                # 0 = level I (default 0.0)
  max_amplifier: 0.0

to_apply can be a list for random selection:

to_apply:
  - minecraft:poison
  - minecraft:wither

Duration and amplifier accept value providers:

min_duration:
  type: linear
  base: 2.0
  perLevel: 1.0
max_duration:
  type: linear
  base: 3.0
  perLevel: 1.5

ignite

Sets the target on fire.

effect:
  type: ignite
  duration: 8.0    # seconds — accepts a value provider

damage_entity

Deals direct damage.

See: Damage types

effect:
  type: damage_entity
  damage_type: minecraft:generic    # required
  min_damage: 1.0                   # accepts value providers
  max_damage: 4.0

change_item_damage

Damages the enchanted item's durability.

effect:
  type: change_item_damage
  amount: 1.0    # accepts a value provider

attribute

Applies an attribute modifier, gated by whatever requirements/parent component fires it — unlike the top-level attributes: component (always active while equipped), this only applies while the containing entity effect actually fires. Vanilla uses this inside Soul Speed's location_changed.

effect:
  type: attribute
  attribute: movement_speed          # short alias or full minecraft:... ID
  operation: add                     # add | add_multiplied_base | add_multiplied_total
  amount: 0.05                       # accepts a value provider
  id: my_namespace:my_enchant/speed  # optional — auto-generated if omitted

apply_exhaustion

Drains the player's food exhaustion meter.

effect:
  type: apply_exhaustion
  amount: 0.1    # accepts a value provider

apply_impulse

Applies a velocity impulse to the target.

effect:
  type: apply_impulse
  direction: [0.0, 1.0, 0.0]          # [x, y, z] unit vector
  coordinate_scale: [1.0, 0.0, 1.0]   # optional — scales each axis by a factor
  magnitude: 2.0                        # accepts a value provider

summon_entity

Spawns an entity at the target's location.

See: Entity IDs

effect:
  type: summon_entity
  entity: minecraft:lightning_bolt    # required — entity ID or list
  join_team: false                    # optional

run_function

Runs a datapack function.

effect:
  type: run_function
  function: mynamespace:my_function    # required — function ID

play_sound

Plays a sound at the target's location.

See: Sound events

effect:
  type: play_sound
  sound: minecraft:entity.lightning_bolt.thunder    # string or list for random pick
  volume: 5.0    # accepts value providers
  pitch: 1.0

Random sound pick:

sound:
  - minecraft:entity.lightning_bolt.thunder
  - minecraft:entity.generic.explode

spawn_particles

Spawns particles at the target.

See: Particle types

effect:
  type: spawn_particles
  particle:                      # required — particle definition (pass raw YAML)
    type: minecraft:flame
  horizontal_position:           # optional position/velocity sections
    type: entity_position
    offset: 0.5
  vertical_position:
    type: entity_position
    offset: 0.5
  speed: 0.1

explode

Creates an explosion at the target.

effect:
  type: explode
  radius: 3.0                          # accepts value provider
  attribute_to_user: true              # optional
  damage_type: minecraft:explosion     # optional
  block_interaction: destroy           # optional: destroy | block | none | trigger_block
  create_fire: false                   # optional
  offset: [0.0, 0.0, 0.0]             # optional [x, y, z]
  immune_blocks: '#minecraft:dragon_immune'  # optional — block tag or list
  knockback_multiplier: 1.0            # optional — value provider
  sound: minecraft:entity.generic.explode   # optional
  large_particle:                      # optional — particle definition (Wind Burst)
    type: minecraft:gust_emitter_large
  small_particle:                      # optional — particle definition
    type: minecraft:gust_emitter_small

replace_block

Replaces the block at the target location with another block state.

effect:
  type: replace_block
  block_state:               # the replacement block state as raw YAML
    Name: minecraft:ice
  offset: [0.0, -1.0, 0.0]  # optional [x, y, z]
  predicate:                 # optional block predicate
    blocks: '#minecraft:water'
  trigger_game_event: minecraft:block_change   # optional

replace_disk

Same as replace_block but fills a disk area.

effect:
  type: replace_disk
  block_state:
    Name: minecraft:frosted_ice
    Properties:
      age: '0'
  radius: 2.0          # accepts value provider
  height: 1.0          # accepts value provider
  offset: [0.0, -1.0, 0.0]

set_block_properties

Changes properties of an existing block without replacing it.

effect:
  type: set_block_properties
  properties:
    waterlogged: 'true'
  offset: [0.0, 0.0, 0.0]
  trigger_game_event: minecraft:block_change

all_of

Runs multiple effects together. Effects inside are all applied unconditionally (use outer requirements to gate the group).

effect:
  type: all_of
  effects:
    - type: ignite
      duration: 4.0
    - type: apply_mob_effect
      to_apply: minecraft:poison
      min_duration: 2.0
      max_duration: 2.0
      min_amplifier: 0.0
      max_amplifier: 0.0

Attribute effects

Attribute modifiers change entity stat values while the enchanted item is equipped. Multiple modifiers are supported.

See: Attributes, Attribute modifiers

attributes:
  - attribute: generic.attack_damage    # short alias or full minecraft:... ID
    operation: add                      # add | add_multiplied_base | add_multiplied_total
    value:
      type: linear
      base: 1.0
      perLevel: 0.5
    id: my_namespace:my_enchant/damage  # optional — auto-generated if omitted
    requirements:                       # optional
      condition: minecraft:random_chance
      chance: 1.0

Attribute operations

YAML value Datapack value Effect
add add_value Adds a flat amount to the base value
add_multiplied_base add_multiplied_base Adds base × amount
add_multiplied_total add_multiplied_total Multiplies the running total

See: Modifier operations

Attribute short aliases

You can use short names instead of the full minecraft: ID:

Short alias Full ID
damage, attack_damage minecraft:generic.attack_damage
attack_speed minecraft:generic.attack_speed
armor, armor_points minecraft:generic.armor
armor_toughness minecraft:generic.armor_toughness
knockback_resistance minecraft:generic.knockback_resistance
max_health, health minecraft:generic.max_health
movement_speed, speed minecraft:generic.movement_speed
luck minecraft:generic.luck
reach, block_reach, block_interaction_range minecraft:player.block_interaction_range
entity_reach, entity_interaction_range minecraft:player.entity_interaction_range
mining_efficiency minecraft:player.mining_efficiency
sneaking_speed minecraft:player.sneaking_speed
submerged_mining_speed minecraft:player.submerged_mining_speed
sweeping_damage_ratio, sweeping minecraft:generic.sweeping_damage_ratio
armor_effectiveness minecraft:generic.armor_effectiveness
gravity minecraft:generic.gravity
jump_strength minecraft:generic.jump_strength
safe_fall_distance minecraft:generic.safe_fall_distance
fall_damage_multiplier minecraft:generic.fall_damage_multiplier
burning_time minecraft:generic.burning_time
explosion_knockback_resistance minecraft:generic.explosion_knockback_resistance
water_movement_efficiency minecraft:generic.water_movement_efficiency
oxygen_bonus minecraft:generic.oxygen_bonus

Any unrecognised alias is expanded to minecraft:generic.<alias> — so any future attributes added by Mojang will work automatically.


Flag components

Boolean toggles. Set to true to enable; false or omitting the key entirely disables (same result).

See: Flag components

Key Effect
prevent_equipment_drop Mobs with this enchantment do not drop their equipment on death
prevent_armor_change Players cannot equip or unequip armor while wearing this item
prevent_equipment_drop: true
prevent_armor_change: true

damage_immunity (gated flag)

Unlike the two flags above, vanilla's damage_immunity is an array of {effect: {}, requirements?} — a flag component that can be conditionally gated by a requirements predicate (Frost Walker only grants immunity while taking burn-from-stepping damage). effect is always empty; only requirements is meaningful.

# Unconditional (always immune)
damage_immunity: true

# Gated (only while a specific damage-source predicate matches)
damage_immunity:
  requirements:
    condition: minecraft:damage_source_properties
    predicate:
      tags:
        - id: minecraft:burn_from_stepping   # NOT prefixed with # — this field is always a tag reference
          expected: true
        - id: minecraft:bypasses_invulnerability
          expected: false

Special components

crossbow_charging_sounds

Defines the sounds played per Quick Charge level while charging a crossbow. One entry per charge level (vanilla has 3).

See: crossbow_charging_sounds

Full form (control both start and end sounds):

crossbow_charging_sounds:
  - start: minecraft:item.crossbow.quick_charge_1
    end: minecraft:item.crossbow.loading_end
  - start: minecraft:item.crossbow.quick_charge_2
    end: minecraft:item.crossbow.loading_end
  - start: minecraft:item.crossbow.quick_charge_3
    end: minecraft:item.crossbow.loading_end

Shorthand (only specify start sounds; end always defaults to minecraft:item.crossbow.loading_end):

crossbow_charging_sounds:
  - minecraft:item.crossbow.quick_charge_1
  - minecraft:item.crossbow.quick_charge_2
  - minecraft:item.crossbow.quick_charge_3

trident_sound

Sounds played per Riptide level when spinning (one per level, vanilla has 3).

See: trident_sound

trident_sound:
  - minecraft:item.trident.riptide_1
  - minecraft:item.trident.riptide_2
  - minecraft:item.trident.riptide_3

Full examples

Sharpness clone

Flat extra damage, grows with level.

sharp_echo:
  Display: '&7Sharp Echo'
  MaxLevel: 5
  ValidSlots: [MAINHAND]
  SupportedItems: '#minecraft:enchantable/sharp_weapon'
  EnchantData:
    damage:
      value:
        type: linear
        base: 1.0
        perLevel: 0.5

Fire-conditional damage boost

Extra damage only when the wielder is on fire.

inferno_strike:
  Display: '&cInferno Strike'
  MaxLevel: 3
  ValidSlots: [MAINHAND]
  SupportedItems: '#minecraft:enchantable/sharp_weapon'
  EnchantData:
    damage:
      value:
        type: linear
        base: 2.0
        perLevel: 1.0
      requirements:
        condition: minecraft:entity_properties
        entity: this
        predicate:
          minecraft:flags:
            is_on_fire: true

Stat-boosting ring (attribute modifiers)

Hypothetical ring item that boosts health and speed.

vitality_ring:
  Display: '&aVitality Ring'
  MaxLevel: 3
  ValidSlots: [OFFHAND]
  SupportedItems: '#mythicenchants:enchantable/ring'
  EnchantData:
    attributes:
      - attribute: max_health
        operation: add
        value:
          type: linear
          base: 2.0
          perLevel: 2.0
      - attribute: movement_speed
        operation: add_multiplied_total
        value:
          type: constant
          value: 0.05

Poisoning strikes (entity effect)

Random chance to poison on hit.

venom_touch:
  Display: '&2Venom Touch'
  MaxLevel: 3
  ValidSlots: [MAINHAND]
  SupportedItems: '#minecraft:enchantable/sharp_weapon'
  EnchantData:
    post_attack:
      enchanted: attacker
      affected: victim
      effect:
        type: apply_mob_effect
        to_apply: minecraft:poison
        min_duration:
          type: linear
          base: 1.0
          perLevel: 1.0
        max_duration:
          type: linear
          base: 2.0
          perLevel: 1.0
        min_amplifier: 0.0
        max_amplifier: 0.0
      requirements:
        condition: minecraft:random_chance
        chance: 0.25

Multi-effect on hit (all_of)

Ignite and slow on hit, with a random chance gate.

glacial_flare:
  Display: '&bGlacial Flare'
  MaxLevel: 2
  ValidSlots: [MAINHAND]
  SupportedItems: '#minecraft:enchantable/sharp_weapon'
  EnchantData:
    post_attack:
      enchanted: attacker
      affected: victim
      effect:
        type: all_of
        effects:
          - type: ignite
            duration: 3.0
          - type: apply_mob_effect
            to_apply: minecraft:slowness
            min_duration: 2.0
            max_duration: 2.0
            min_amplifier: 1.0
            max_amplifier: 1.0
      requirements:
        condition: minecraft:random_chance
        chance: 0.20

Custom Quick Charge with sounds

swift_draw:
  Display: '&eSwift Draw'
  MaxLevel: 3
  ValidSlots: [MAINHAND]
  SupportedItems: '#minecraft:enchantable/crossbow'
  EnchantData:
    crossbow_charge_time:
      value:
        type: linear
        base: -0.25
        perLevel: -0.25
    crossbow_charging_sounds:
      - minecraft:item.crossbow.quick_charge_1
      - minecraft:item.crossbow.quick_charge_2
      - minecraft:item.crossbow.quick_charge_3

Protection with level-scaled damage reduction

Mimics vanilla Protection using levels_squared.

arcane_guard:
  Display: '&9Arcane Guard'
  MaxLevel: 4
  ValidSlots: [HEAD, CHEST, LEGS, FEET]
  SupportedItems: '#minecraft:enchantable/armor'
  EnchantData:
    damage_protection:
      value:
        type: levels_squared
        added: 1.0

Multiple value effect entries (gated stacking)

Base reduction always applies; bonus kicks in only underwater.

tide_ward:
  Display: '&3Tide Ward'
  MaxLevel: 3
  ValidSlots: [CHEST]
  SupportedItems: '#minecraft:enchantable/armor'
  EnchantData:
    damage_protection:
      entries:
        - value:
            type: linear
            base: 1.0
            perLevel: 1.0
        - value:
            type: constant
            value: 3.0
          requirements:
            condition: minecraft:entity_properties
            entity: this
            predicate:
              minecraft:flags:
                is_in_water: true
Updated Sep 22, 2026