Skip to content

Recipes

Forge recipes define blueprint requirements, material entries, capacity, quality rules, result items, metadata operations, and actions. Recipe files are stored in recipes/*.yml.

Main fields

FieldDescription
idUnique recipe id.
display_nameRecipe display name.
forge_capacityTotal capacity limit for materials.
blueprint_requirementsRequired blueprint items.
materialsRequired or optional material entries.
optional_material_limitMaximum optional material types.
qualityQuality pool and pity configuration.
success_rateForge success rate in percent. Defaults to 100 (always succeeds).
failure_outcomesFailure outcome plans, meaningful only when success_rate < 100.
result.success.outputsSuccess-branch output list. Forge uses the first entry as the primary result.
result.success.name_actionsName operation chain for the result item.
result.success.lore_actionsLore operation chain for the result item.
result.success.actionsActions executed after result generation.
actionsPre, success, and failure actions.
permissionOptional permission requirement.

Result output

When result.success.outputs is configured, a successful forge creates the first entry as the primary result item and attaches the forge layer snapshot.

The bundled forge_gui template only provides blueprint and material slots; it has no target equipment input slot. When using the bundled GUI you must configure result.success.outputs, otherwise no forge result can be produced.

Success rate and failure outcomes

success_rate defaults to 100, meaning the forge always succeeds. Setting it below 100 makes forging able to fail, in which case one plan is picked from failure_outcomes by weight.

yaml
success_rate: 70
failure_outcomes:
  - type: "return_materials"
    weight: 50
    params:
      return_rate: 1.0
  - type: "partial_consume"
    weight: 30
    params:
      return_rate: 0.5
  - type: "consume_materials"
    weight: 20

Outcome types handled distinctly by the current implementation:

typeBehaviorparams
return_materialsReturn materials at return_rate.return_rate, default 1.0.
partial_consumePartially return materials at return_rate.return_rate, default 0.5.
consume_materialsConsume everything, return nothing.none.

Without failure_outcomes, the default is return_materials with a full refund. Other type values do not raise an error but are treated as a full material refund.

Quality configuration

Note the recipe-level field names differ from the global config: the pool field is custom_pool and the pity threshold field is attempts.

yaml
quality:
  enabled: true
  custom_pool:
    - "Common-70-1.0"
    - "Fine-25-1.05"
    - "Epic-5-1.15"
  guarantee:
    enabled: true
    attempts: 60
    minimum: "Flawless"

Result name and lore actions

result.success.name_actions and result.success.lore_actions execute name and lore operations on the result item after a successful forge.

yaml
result:
  success:
    outputs:
      - item_sources:
          - "minecraft-diamond_sword"
        amount: 1
    name_actions:
      - action: "append_suffix"
        value: " <gray>[%quality_name%]</gray>"
    lore_actions:
      - action: "append"
        content:
          - ""
          - "<gray>Quality: <white>%quality_name%</white></gray>"
          - "<gray>Multiplier: <white>%quality_multiplier%</white></gray>"

Recipe result actions, material effect actions, and quality item_meta actions are merged and then applied to the result item together.

Available template variables

VariableDescription
%quality%Quality tier name. Injected only when a quality tier resolved.
%quality_name%Quality display name, same value as %quality%.
%quality_multiplier%Quality multiplier, formatted as 0.##.
%multiplier%Short alias of the quality multiplier.
%<stat_id>%Any variable injected through material variables effects, already scaled by material amount and quality multiplier.

Minimal example

yaml
id: "flame_sword"
display_name: "<red>Flame Sword</red>"
forge_capacity: 10
blueprint_requirements:
  - item_sources:
      - "minecraft-paper"
    amount: 1
materials:
  - item_sources:
      - "minecraft-blaze_rod"
    amount: 3
    capacity_cost: 5
    effects:
      - type: "variables"
        variables:
          fire_damage: 10
      - type: "lore_action"
        lore_actions:
          - action: "append"
            content:
              - "<red>Fire Damage: +%fire_damage%</red>"
optional_material_limit: 2
quality:
  enabled: true
  custom_pool:
    - "Common-80-1.0"
    - "Fine-20-1.05"
result:
  success:
    outputs:
      - item_sources:
          - "minecraft-diamond_sword"
        amount: 1
    name_actions:
      - action: "append_suffix"
        value: " <gray>[%quality_name%]</gray>"
    lore_actions:
      - action: "append"
        content:
          - ""
          - "<gray>Quality: <white>%quality_name%</white></gray>"
actions:
  success:
    - 'sendmessage text="<green>Flame power infused into the weapon."'

Action nodes

NodeTrigger
actions.preBefore recipe execution.
actions.successAfter successful forge.
actions.failureAfter failed forge.
result.success.actionsWhen the result is generated or applied.

The successful result chain runs in this order: result.success.actionsactions.success → quality actions. Actions inside each list run serially, and each stage waits for the previous stage to finish. Forge reads the final stack from the mutable item_target holder and delivers it only after all three stages settle. This lets EmakiItem component actions safely mutate the forge result without an older stack being delivered early. Failed action batches are logged but do not discard an already generated forge result.