Skip to content

Recipes

Strengthening recipes define target matching, economy cost, star limits, base success rates, required materials, effects, and actions. Recipe files are placed in recipes/*.yml, and the file name is normally used as the recipe id.

Top-level fields

FieldDescription
idUnique recipe id.
display_nameDisplay name.
gui_templateGUI template id.
economyEconomy cost configuration for each attempt.
limitsMaximum star, temper limit, and chance cap.
success_ratesBase success chance for each target star.
matcherNon-item-source conditions (component, PDC, lore, variable) deciding which items can use this recipe. See Match rules.
source_patternsItem source matching by regex, AND-combined with matcher. This is where item source conditions go at the top level.
slot_groupsSlot group matching, AND-combined with matcher. See Match rules.
stats_anyAttribute matching, AND-combined with matcher.
matchDeprecated and no longer read. See Migrating from match.
name_actionsGlobal name operations applied after success.
lore_actionsGlobal lore operations applied after success.
starsPer-star material, effect, and action definitions.

Economy

yaml
economy:
  enabled: true
  currencies:
    - provider: "vault"
      currency_id: ""
      base_cost: 320
      cost_formula: "%base_cost% * %star%"
      display_name: "<gold>Coins</gold>"

cost_formula can reference variables such as %base_cost% and %star%.

Limits

yaml
limits:
  max_star: 12
  max_temper: 4
  temper_chance_bonus_per_level: 5.0
  success_chance_cap: 90.0
FieldDescription
max_starMaximum reachable star.
max_temperMaximum temper level accumulated from failures.
temper_chance_bonus_per_levelSuccess chance bonus per temper level.
success_chance_capUpper success chance after all bonuses.

Match rules

Target matching is decided by four top-level fields, combined with AND:

yaml
slot_groups:
  - "weapon"

# Item source condition at the top level goes in source_patterns.
# Anchor the pattern to bind one exact source.
source_patterns:
  - "^emakiitem-example_item$"
FieldTypeDescription
matcherobjectNon-item-source conditions only: component, PDC, lore, variable. Item source conditions written inside it (type: item_source and aliases) are rejected at load time and never match. Syntax is in Item Matcher.
source_patternslistMatch the item source shorthand by regex. Case-insensitive partial match, so anchor it (^...$) to bind one exact source. Matching any one pattern passes.
slot_groupslistCoarse slot/equipment type groups (weapon/armor/offhand/generic), not concrete slots such as main_hand or helmet.
stats_anylistHas any of the given attributes.

Migrating from match

The old match block is no longer read. Where each field goes:

Old fieldCurrent form
match.source_idsAn anchored entry in the top-level source_patterns, such as "^minecraft-diamond_sword$"
match.lore_containsA type: component child with component: lore and operator: contains, one per fragment
match.slot_groupsPromoted to a top-level slot_groups
match.stats_anyPromoted to a top-level stats_any
match.source_patternsPromoted to a top-level source_patterns
match.source_typesCannot be converted automatically; rewrite it as a matcher condition by hand

/emakistrengthen convert-legacy performs the conversion:

CommandBehaviour
/emakistrengthen convert-legacyDry run; prints the diff it would produce without touching files.
/emakistrengthen convert-legacy confirmRewrites recipes/*.yml and leaves a .bak backup per file.

--apply is equivalent to confirm. The command requires emakistrengthen.admin.

WARNING

Files containing match.source_types are reported as unconvertible and skipped. Files declaring both match and an existing matcher (or the corresponding top-level field) are reported as conflicts and skipped. Both cases need manual handling.

match.source_ids is converted automatically into anchored regexes merged into the top-level source_patterns, never into a node inside matcher, so the output needs no manual fix-up. Those regexes are exact matches: ^ / $ anchors are added and special characters in the ID are escaped, giving entries like ^\Qemakiitem-xxx\E$.

Legacy material normalization and rejection

Stage-material parsing normalizes a legacy scalar item into item_sources, then resolves material_id in this order: explicit material_id, legacy id, count_key, a single source, and finally the stage index. An omitted count_key falls back to material_id. When no identity is declared but multiple sources are supplied, the parser cannot choose a safe unique identity and rejects the material without rewriting the source map. These rules are established by the current JVM parser and local tests; old configuration and persisted-save behavior has not been verified on a live Paper or Folia server.

TIP

Anchor a source_patterns entry for exact binding so a recipe does not accidentally match every weapon.

General item matcher

Recipes accept a matcher in two places: the top-level matcher narrows the target item, and stars.*.materials[].matcher re-verifies strengthening materials. Both use the same syntax, but they express the item source differently:

LocationHow the item source is expressed
Top-level matcherThrough the top-level source_patterns (regex). source_patterns, matcher, slot_groups, and stats_any are ANDed; all must hold.
materials[].matcherThrough the sibling item_sources. The material is selected by its item_sources token first, then matcher re-checks the actual item; both must hold.

NOTE

Item source conditions never belong inside matcher here either — at the top level use source_patterns, in materials use the sibling item_sources.

Full syntax is in Item Matcher.

yaml
id: enchanted_sword_strengthen

# Item source condition: only diamond swords
source_patterns:
  - "^minecraft-diamond_sword$"

# Component condition: with Sharpness 3+
matcher:
  type: component
  component: enchantments
  path: sharpness
  operator: '>='
  value: 3

stars:
  1:
    materials:
      # item_sources selects the material, matcher re-verifies it
      - item_sources:
          - minecraft-copper_ingot
        matcher:
          type: component
          component: custom_name
          operator: absent
        amount: 3

WARNING

Item sources use a hyphen (minecraft-copper_ingot), not a colon. Written as minecraft:copper_ingot in item_sources the parser treats it as invalid and silently discards it, leaving the item source unrestricted. See Item sources use hyphens, component IDs use colons.

target.filter in enhancement recipes

enhancement_recipes/*.yml (a separate recipe set from the recipes/*.yml covered on this page) also accepts a general item matcher in target.filter: when filter contains a type key it is parsed as a matcher, otherwise it keeps the existing provider-specific key/value behaviour.

yaml
target:
  provider: equipment
  # Has a type key -> parsed as a general item matcher
  filter:
    type: component
    component: enchantments
    operator: exists
yaml
target:
  provider: equipment
  # No type key -> still interpreted as free-form provider keys (existing behaviour)
  filter:
    item_type: SWORD

Its materials[] entries follow the standard shape: item_sources for the allowed item sources and a sibling matcher for non-item-source conditions, ANDed. Item source conditions that used to sit inside matcher belong in item_sources now.

NOTE

The remaining fields of the enhancement_recipes/ set are not yet documented on this site; this section covers only where it accepts a matcher.

:::

Star stage materials

FieldTypeDefaultDescription
item_sourceslistnoneAllowed material item sources; selects the material.
matcherobjectnoneNon-item-source conditions re-verifying the actual item, ANDed with item_sources. See Item Matcher.
amountinteger1Required amount. Use -1 to require possession without consuming.
optionalbooleanfalseWhether the material is optional.
protectionbooleanfalsePrevents a star drop on failure.
temper_boostinteger0Extra temper levels supplied for this attempt.
yaml
materials:
  - item_sources:
      - "minecraft-copper_ingot"
    amount: 3
  # Protection material: not consumed, only checked
  - item_sources:
      - "minecraft-gold_nugget"
    amount: -1
    optional: true
    protection: true

Success rates

yaml
success_rates:
  1: 100.0
  2: 95.0
  3: 90.0
  4: 80.0
  5: 70.0

Keys represent the target star, and values are percentages. Temper bonuses are applied after the base rate and are capped by limits.success_chance_cap.

Star example

yaml
stars:
  1:
    effects:
      - type: "variables"
        variables:
          physical_attack: 4
      - type: "lore_action"
        lore_actions:
          - action: "append"
            content:
              - "<gray>Physical Damage: <gold>+4</gold></gray>"
    materials:
      - item_sources:
          - "minecraft-copper_ingot"
        amount: 1
      - item_sources:
          - "minecraft-gunpowder"
        amount: 2

  2:
    effects:
      - type: "variables"
        variables:
          physical_attack: 4
      - type: "lore_action"
        lore_actions:
          - action: "replace_line"
            anchor: "Physical Damage:"
            content:
              - "<gray>Physical Damage: <gold>+8</gold></gray>"
    materials:
      - item_sources:
          - "minecraft-copper_ingot"
        amount: 1

Effect types

TypeDescription
variablesExpression variables used by lore, name/lore templates, and placeholder context. They do not automatically become Attribute PDC attributes.
ea_attributeExplicit EmakiAttribute PDC attribute payload.
es_skillEmakiSkills skill attachment; payload uses the es_skills list.
lore_actionLore operation.
name_actionItem name operation.

Current effect boundaries:

  • variables only provide text, placeholder, and operation-template context.
  • Real attribute output must be configured explicitly with type: "ea_attribute" and ea_attributes.
  • Skill attachments use type: "es_skill", while concrete skill ids are stored in the es_skills list.

Notes

  • Use high success rates for early stars and gradually increase material cost.
  • Use protection materials for high-risk levels when item downgrade or destruction is enabled by recipe logic.
  • Prefer replace_line for repeated stat lines to avoid duplicate lore.
  • Test old strengthened items after changing recipe ids or match rules.