Crafting Recipe - apace100/origins-fabric GitHub Wiki

Data type used to specify a crafting recipe. For some more information, view the page on recipes on the MC wiki.

Fields (both types):

type, string: Either minecraft:crafting_shaped or minecraft:crafting_shapeless. Other recipe types are not supported.

id, string: An identifier for this recipe. Can be anything you want, but should follow the regular identifier format (i.e. namespace:path) and be unique.

result, object with item and count: Item identifier of the result, as well as the amount of items crafted (defaults to 1).


Fields (shapeless):

ingredients, array of Ingredients: These items need to be put in the crafting grid for the recipe.

Example (shapeless):

{
  "type": "minecraft:crafting_shapeless",
  "id": "origins:fire_charge_without_blaze_powder",
  "ingredients": [
    {
      "item": "minecraft:gunpowder"
    },
    [
      {
        "item": "minecraft:coal"
      },
      {
        "item": "minecraft:charcoal"
      }
    ]
  ],
  "result": {
    "item": "minecraft:fire_charge",
    "count": 3
  }
}

Fields (shaped):

pattern, array of strings: Specifies the pattern, with each element representing one row. Use a single character to describe one item. Space means that position is empty.

key, object of one or more "char": ingredient: Specifies which character corresponds to which Ingredient.

Example (shaped):

{
  "type": "minecraft:crafting_shaped",
  "id": "origins:sideways_birch_boat",
  "pattern": [
    "##",
    " #",
    "##"
  ],
  "key": {
    "#": {
      "item": "minecraft:birch_planks"
    }
  },
  "result": {
    "item": "minecraft:birch_boat"
  }
}