Creating Enchantments
Quick Start
Complete YAML Field Reference
# ============================================================
# REQUIRED FIELDS
# ============================================================
# Display name shown on items (MiniMessage format)
display_name: "<green>My Enchant"
# Maximum enchantment level (1-10)
max_level: 3
# Which items this enchant can be applied to
# Can be item group names or specific material names
applicable_items:
- SWORDS
- AXES
# When the enchantment activates
# Options: ATTACK_ENTITY, KILL_ENTITY, TAKE_DAMAGE, RIGHT_CLICK,
# BLOCK_BREAK, BOW_SHOOT, PROJECTILE_HIT, FISHING,
# FISH_BITE, PASSIVE, SNEAK, DEATH
trigger: ATTACK_ENTITY
# Who the enchantment affects
# Options: SELF, PLAYERS, MOBS, ALL_ENTITIES, NONE
target: ALL_ENTITIES
# ============================================================
# OPTIONAL FIELDS
# ============================================================
# Description shown in item lore (MiniMessage format)
description:
- "<gray>Line one of description."
- "<gray>Line two of description."
# Cooldown between activations in milliseconds (0 = no cooldown)
cooldown: 5000
# Probability of triggering (omit entirely for 100% activation)
chance:
base: 0.10 # Base chance at level 1
per_level: 0.05 # Additional chance per level
# Result: Level 1 = 15%, Level 2 = 20%, Level 3 = 25%
#
# For fixed chance (same at all levels):
# scaling: fixed
# value: 0.5
# List of enchant IDs this conflicts with
conflicts:
- other_enchant_id
# ============================================================
# ENCHANTING TABLE (optional section)
# ============================================================
enchanting_table:
enabled: true # Whether it appears in enchanting table
weight: 5 # Rarity weight (higher = more common)
min_cost: 10 # Minimum enchanting level cost
max_cost: 30 # Maximum enchanting level cost
# ============================================================
# VILLAGER TRADES (optional section)
# Overrides enchanting_table settings for librarian villagers.
# If omitted, falls back to enchanting_table.enabled/weight
# and global emerald costs from config.yml.
# ============================================================
villager_trades:
enabled: true # Whether it appears in villager trades
weight: 5 # Rarity weight (higher = more common)
base_emerald_cost: 10 # Minimum emerald cost
max_emerald_cost: 32 # Maximum emerald cost
# ============================================================
# LOOT GENERATION (optional section)
# Overrides enchanting_table settings for chest loot.
# If omitted, falls back to enchanting_table.enabled/weight.
# ============================================================
loot_generation:
enabled: true # Whether it appears in chest loot
weight: 5 # Rarity weight (higher = more common)
# ============================================================
# SOUND ON ACTIVATION (optional section)
# ============================================================
sound:
type: entity_experience_orb_pickup # Minecraft sound registry name (lowercase, underscored)
volume: 1.0 # Volume (0.0 - 1.0)
pitch: 1.0 # Pitch (0.5 - 2.0)
# ============================================================
# PARTICLE ON ACTIVATION (optional section)
# ============================================================
particle:
type: CRIT # Particle enum name (UPPERCASE)
count: 10 # Number of particles
spread: 0.5 # Spread radius
speed: 0.1 # Particle speed
location: TARGET # Where to spawn: SELF, TARGET, or BLOCK
# ============================================================
# ACTIONS (the actual effects)
# ============================================================
actions:
my_action_key: # Unique key name (any string, used internally)
type: potion_effect # Action type name (see Action Types page)
# ... action-specific parameters (see Action Types page)Field Details
display_name (required)
display_name (required)max_level (required)
max_level (required)applicable_items (required)
applicable_items (required)trigger (required)
trigger (required)target (required)
target (required)description (optional)
description (optional)cooldown (optional)
cooldown (optional)chance (optional)
chance (optional)conflicts (optional)
conflicts (optional)enchanting_table (optional)
enchanting_table (optional)villager_trades (optional)
villager_trades (optional)Field
Description
loot_generation (optional)
loot_generation (optional)Field
Description
sound (optional)
sound (optional)particle (optional)
particle (optional)actions (required for functional enchants)
actions (required for functional enchants)Complete Example: Custom Sword Enchantment
Testing
Last updated