1

I would like to edit some smithing recipes in a modpack I am making. I have the following:

{
  "type": "minecraft:smithing_transform",
  "template": {
    "item": "minecraft:air"
  },
  "base": {
    "item": "minecraft:iron_ingot"
  },
  "addition": {
    "tag": "twilightforest:fiery_vial"
  },
  "result": {
    "item": "twilightforest:fiery_ingot"
  }
}

I assumed "template" was optional, since of course, you may want to smith something without a template, but regardless of whether I have it or not, this recipe still fails to load.

If I have the above (with template section), it gives me: "Missing field template"

if I remove the template section, I get: "Empty ingredient not allowed here"

1 Answer 1

3

Smithing something without a template is not possible using the vanilla smithing mechanics.

The smithing upgrade mechanic was introduced with the intent to allow players to modify their equipment (e.g. tools, weapons, armor) by replacing the base item with a result item while preserving the NBT data (e.g. enchantments, durability usage, prior work penalty). This mechanic requires a template by design (see Smithing: Equipment). If you look at the JSON data format for a smithing upgrade recipe (see Recipe: smithing_transform), you will find that the template component is indeed not optional.

Here are three options to achieve what you seem to be doing, starting from my strongest advice:

  1. If you want to add a recipe that doesn't require a smithing template, maybe you want a crafting recipe instead? To me personally, combining an Iron Ingot and a Fiery Vial sounds more like a crafting recipe, because normally there wouldn't be any NBT data that needs to be preserved when upgrading an Iron Ingot to a Fiery Ingot. After all, the good old Crafting Table has a hammer too, you know. :)

  2. If you really want to add a custom smithing recipe, I advise you to add a template item for that recipe. It doesn't have to be something expensive to make, but it should be an iconic token representing your smithing process. It could be something as simple as a blueprint scribbled on a piece of paper.

  3. If you are absolutely sure that it has to be a smithing recipe without a smithing template, you will have to implement your own smithing mechanics, your own smithing block and likely your own menu for it. This is probably not worth the hassle, but is a way nonetheless. If you're planning to add a lot of templateless custom smithing recipes, this mechanic could be a core feature of your mod.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .