CRAFTING SHAPED
Here is the explanation of the parameters used in the example recipe, along with the provided code snippet:
type
: The type of recipe. In this example, it is"minecraft:crafting_shaped"
, indicating that this is a shaped crafting recipe.category
: The category of the recipe. In this example, it is"misc"
.pattern
: The pattern of the crafting grid. Each line represents a row on the crafting table, and spaces represent empty spots in the grid.key
: This is where you define the materials used in the recipe. The keys in the pattern (e.g.,"A"
,"B"
,"C"
) correspond to items defined in this section.result
: The output of the crafting recipe.item
: The item produced as a result of the recipe.count
: The quantity of the item.
In your example, you are crafting "coreextensions:item4"
using three other items ("item1"
, "item2"
, "item3"
). The pattern defines how these items are arranged in the crafting grid, and the keys section defines which items correspond to the keys in the pattern. The "result"
section specifies that one instance of "coreextensions:item4"
will be produced.
Make sure to place this recipe file in the appropriate directory within your data pack, following the directory structure you outlined earlier. This will allow the game to recognize and use your custom recipe.
item4_shaped.json
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"A ",
" B ",
" C"
],
"key": {
"A": {
"item": "coreextensions:item1"
},
"B": {
"item": "coreextensions:item2"
},
"C": {
"item": "coreextensions:item3"
}
},
"result": {
"item": "coreextensions:item4",
"count": 1
}
}
Last updated