Crafting Recipe (Data Type)

An Object specifying a shapeless or shaped crafting recipe.

An Object specifying a shapeless or shaped crafting recipe.

Fields (both types)

FieldTypeDefaultDescription
typeIdentifierThe type of recipe. Either minecraft:crafting_shaped or minecraft:crafting_shapeless. Other recipe types are not supported.
idIdentifierAn ID for this recipe. Has to be unique among all recipes, otherwise there will be a conflict.
resultObject with an item ID and count IntegerThe result of the crafting. Note that vanilla does not support NBT tags in the result.

Fields (shapeless)

FieldTypeDefaultDescription
ingredientsArray of IngredientThe items that need to be put in the crafting grid for the recipe.

Examples (shapeless)

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

A crafting recipe to craft fire charges, but without the blaze powder required by the vanilla recipe.

Fields (shaped)

FieldTypeDefaultDescription
patternArray of StringsSpecifies the pattern, with each element representing one row. Use a single character to describe one item. A space means that position is empty.
keyObject of “character”: Ingredient fieldsSpecifies which character in the pattern corresponds to which Ingredient.

Examples (shaped)

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

A crafting recipe for a birch boat, but with the planks rotated to the side in the crafting grid.