Skip to content

Custom Anvil Recipes

Raik176 edited this page Apr 12, 2025 · 2 revisions

To add a custom anvil recipe to the game, create a file with any name in data/<namespace>/utils/anvil_recipe. The filename must end in .json.

Fields marked with an * are optional!

Fields:

  • cost The cost of this recipe in levels. Default is 1.*
  • ignoreName Whether to ignore the name for the output item. Default is true.*
  • input Main input of this recipe, as an Anvil Recipe Input object.
  • secondaryInput Secondary input of this recipe, as an Anvil Recipe Input object. Default is none.*
  • output Output item of this recipe, as an Item Stack

Objects

Anvil Recipe Input

Fields marked with an * are optional!

The input items should consist of non stackable items, as crafting in an anvil always consumes the entire stack!

Fields:

  • item The item to use as an input. Takes precedence over tag.
  • tag The tag to use as an input.

Item Stack

Fields marked with an * are optional!

Fields:

  • id Item id of this item. Must not be air.
  • count Count/Stack amount of this item. Must be above 0.
  • components Components of this item. Only for 1.20.5+. Default value is none.*
  • tag NBT of this item. Only for versions below 1.20.5. Default value is none.*

Clone this wiki locally