Anvil combine cost
anvil_combine_costSimulates exactly one Minecraft anvil operation — combining item (the base, left slot) with sacrifice (the right slot), optionally renaming the result — with no search or planning: it's a direct simulation of that specific in-game anvil use, not a 'find the cheapest way to reach X' query. Returns the XP-level cost, feasibility, and the resulting enchantments. A sacrifice enchantment the base item cannot take (e.g. Efficiency from a book onto a sword) is ignored by the anvil: cost 0, transferred: false. For finding the cheapest multi-step path from a current state to a target enchantment set, use anvil_migration_path instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| edition | No | Minecraft edition; defaults to 'java' | |
| newName | No | Desired custom name for the result. A rename is included only if this differs from item.name (use '' to clear an existing name) — cost is a flat +1 XP level, the actual text has no effect on cost. Omit to leave the name untouched. | |
| version | No | Game version, e.g. '1.21.4'; defaults to the latest supported version for the chosen edition | |
| sacrifice | Yes |