Rarities

Rarity

Overview

Rarity is a metadata classification assigned to each enchantment. It serves as a label for organizational and display purposes — it is available in skill variables and PlaceholderAPI but does not directly affect enchanting table mechanics like selection probability or XP cost.

Enchanting table behavior is controlled by the Enchanting block's Weight, MinCost, and MaxCost fields, not by rarity.

Built-in Rarity Tiers

Tier Display Name Color
COMMON Common White
UNCOMMON Uncommon Green
RARE Rare Aqua
VERY_RARE Very Rare Blue
EPIC Epic Dark Purple
LEGENDARY Legendary Gold
MYTHIC Mythic Light Purple

If omitted from an enchantment definition, rarity defaults to COMMON.

Custom Rarities

Custom rarity tiers can be defined in YAML files placed in a Rarities/ folder inside any MythicMobs pack. Built-in tiers can also be overridden to change their color or display name.

File Location

  • plugins/MythicMobs/packs/<PackName>/Rarities/ — per-pack rarities folder

Schema

Top-level keys are the rarity ID (case-insensitive).

ANCIENT:
  Color: "#E6C570"        # hex (#RRGGBB) or named color (e.g. gold, dark_purple, aqua)
  DisplayName: "Ancient"  # optional — defaults to Title Case of the id

FORBIDDEN:
  Color: "#CC0033"
  DisplayName: "Forbidden"

# Override a built-in tier's color:
EPIC:
  Color: "#AA00FF"
  DisplayName: "Epic"

If DisplayName is omitted, it is derived automatically from the id — for example very_rare becomes Very Rare.

Using Rarity in an Enchantment

my_enchant:
  Display: '&6My Enchant'
  Rarity: ANCIENT
  MaxLevel: 3
  SupportedItems: '#minecraft:enchantable/sword'

What Rarity Does

Skill Variable

Rarity is injected as a skill variable during enchantment triggers:

Skills:
- message{msg="You activated a <skill.var.enchant-rarity> enchantment!"} @self ~onAttack

Available as both <skill.var.enchant-rarity> and <skill.var.enchant_rarity>. Returns the uppercase ID (e.g. RARE, ANCIENT).

PlaceholderAPI

When PlaceholderAPI is installed, rarity can be queried for any enchantment:

%mench_enchant_rarity_<id>%

Datapack Generation

Rarity is included in the generated datapack for forward compatibility with vanilla Minecraft's enchantment system.

What Rarity Does NOT Do

  • Selection probability — controlled by Enchanting.Weight, not rarity
  • XP cost — controlled by Enchanting.MinCost and Enchanting.MaxCost
  • Treasure gating — controlled by Options.Treasure
  • Lore/tooltip display — not shown automatically; use placeholders to add it to custom lore

Rarity vs. Weight

A common misconception is that rarity affects how often an enchantment appears at the enchanting table. In MythicEnchants, these are intentionally decoupled:

# LEGENDARY rarity, but appears frequently due to high weight
common_legendary:
  Rarity: LEGENDARY
  Enchanting:
    Weight: 10

# COMMON rarity, but appears rarely due to low weight
rare_common:
  Rarity: COMMON
  Enchanting:
    Weight: 1

This separation gives pack authors full control — rarity can be used for thematic purposes (display, lore, skill scaling) while weight independently controls actual table frequency.

Example: Rarity-Scaled Skills

Since rarity is available as a skill variable, you can use conditions to scale enchantment effects by tier:

RarityDamageBonus:
  Skills:
  - damage{a=<math:enchant_level*1.0>} @trigger ?stringequals{a=<skill.var.enchant-rarity>;b=COMMON} ~onAttack
  - damage{a=<math:enchant_level*1.5>} @trigger ?stringequals{a=<skill.var.enchant-rarity>;b=RARE} ~onAttack
  - damage{a=<math:enchant_level*2.0>} @trigger ?stringequals{a=<skill.var.enchant-rarity>;b=LEGENDARY} ~onAttack
  - damage{a=<math:enchant_level*3.0>} @trigger ?stringequals{a=<skill.var.enchant-rarity>;b=ANCIENT} ~onAttack
Updated Aug 19, 2026