# Creating Custom Recipes

You can also make your own custom recipes in an addon data pack with this template below.

{% file src="<https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FP8xM9KVfXe7JQWPM7svL%2FEoM-custom-altar-recipe-template.zip?alt=media&token=b954b7f8-5c64-4d3d-82ee-a5ba038e53dc>" %}

## Step 1:

Rename the folder (opotional)\
![](https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2F9LAjAMXElqtL2Jxi6XBf%2Fimage.png?alt=media\&token=2a2979b4-7196-4a89-84fa-9d5ab02937a4)==>![](https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2F2P08SvnJJKres9SCAiTF%2Fimage.png?alt=media\&token=78120902-db05-4bf8-90dc-31c542f55e56)

## Step 2:

Edit the pack.mcmeta file, so that it has the right `pack_format`. You can find a list that tells you which pack format you need in which version of the game in the [Minecraft Wiki](https://minecraft.fandom.com/wiki/Pack_format).

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FlP7xTwlkDT9OTPzQkiRN%2Fimage.png?alt=media&#x26;token=224c227f-e401-4987-920e-876a4398fee0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FUsj87G5QfmFBPaeDOFwD%2Fimage.png?alt=media&#x26;token=9c6a8eb5-c9fb-4c0c-aa08-cc5ffde8d9dc" alt=""><figcaption></figcaption></figure>

## Step 3:

Rename the name space of your data pack.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FFBYTQ7o2oHHrgTdySdib%2FBild_2023-01-31_220618824.png?alt=media&#x26;token=e3594ec6-d1f1-4973-b159-11add957baa4" alt=""><figcaption></figcaption></figure>

## Step 4:

Go to the advancement.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FxeztaaX68eYciakuCt1v%2FBild_2023-01-31_221205820.png?alt=media&#x26;token=97875719-e574-40da-95d7-7c8f2a8b4eaf" alt=""><figcaption></figcaption></figure>

Change this part to your data pack name space.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FNGSwzOJiBWJXH2qdGBJL%2FBild_2023-01-31_221449601.png?alt=media&#x26;token=7889c0e3-54f6-4c30-9e64-8bdadfd14f0f" alt=""><figcaption></figcaption></figure>

## Step 5:

Go to the function that is set as a reward in the advancement.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FDQGa97Fu6J46RlWR93nt%2FBild_2023-01-31_221728683.png?alt=media&#x26;token=57f93e75-1c72-4769-9c89-2a087da1759d" alt=""><figcaption></figcaption></figure>

Normally you shouldn't change anything in this function but here you also have to change the name spaces.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2F1iZPHxG7zZJphihrEwCu%2FBild_2023-01-31_222131734.png?alt=media&#x26;token=23c5e3fa-0980-4f4f-98fc-975ab8e8262a" alt=""><figcaption></figcaption></figure>

## Step 6:

Next you'll have to make some sub-folders and copy files.\
\
Go to the folder named "wich \_recipe" *(I know it's spelled wrong)* and create a new folder with the name of the item, that will be in the center of the recipe, but only if it doesn't already exists.\
\
In this new folder copy the two files from the stick folder and rename them.\
After you copied them, delete the whole stick folder.

{% hint style="info" %}
If your enter item is for example a dirt block rename the files like this:\
\
`stick.mcfunction` => `dirt.mcfunction`\
`stick1.mcfunction` => `dirt1.mcfunction`\
\
and if you have more than one recipe with the same center item just increase the number:\
\
`dirt2.mcfunction`\
`dirt3.mcfunction`\
`...`
{% endhint %}

## Step 7:

Open the renamed `stick1.mcfunction` file.\
\
In this function you specify a recipe, so I just call it a "recipe file".&#x20;

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2Fc9m375JuWgWeuCnaHjos%2FBild_2023-01-31_231351852.png?alt=media&#x26;token=06471a2a-1d16-405a-932d-a643aa11ddba" alt=""><figcaption></figcaption></figure>

* <mark style="color:yellow;">The comment explains everything.</mark>

* <mark style="color:green;">Here you can set the Mana cost. If you don't want a Mana cost just delete the whole line.</mark>

* <mark style="color:red;">Here you can set the result of the recipe. You can  use:</mark>\ <mark style="color:red;">-</mark> <mark style="color:red;"></mark><mark style="color:red;">`/loot spawn ...`</mark>\ <mark style="color:red;">-</mark> <mark style="color:red;"></mark><mark style="color:red;">`/summon ...`</mark>

* ## Step 8:

Open the renamed `stick.mcfunction` file.\
\
In this file you list all recipe files that have a center item with the same name of this file, so I just  call it a "center item parent file".

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FxaC9cOkumd0Urf2Ie0Fh%2FBild_2023-01-31_225044619.png?alt=media&#x26;token=a395a531-8a6d-4302-986d-34c582bb9d62" alt=""><figcaption></figcaption></figure>

* <mark style="color:yellow;">Ignore this comment</mark>

* <mark style="color:red;">With this you can set that the recipe is only available after researching a specific thing.</mark>\ <mark style="color:red;">**(this is not recommended and you should rather delete it with the comma)**</mark>

* <mark style="color:purple;">If you want you can set Mana cost that the player has to have in order to craft the item.</mark> \ <mark style="color:purple;">**(the dots are very important. Don't delete them if you have a Mana cost).**</mark>\
  \ <mark style="color:purple;">If you don't want a Mana cost delete</mark> `mana matches 10..` <mark style="color:purple;">and replace</mark> `score` <mark style="color:purple;">with</mark> `entity`

* <mark style="color:green;">Change this to your data pack name space.</mark>

* <mark style="color:blue;">Change this to the folder name and file names that you changed them to.</mark>\ <mark style="color:blue;">( .../stick/stick1 ==> .../dirt/dirt1 )</mark>

## Step 9:

If you now go 2 folder back you have to open this file.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2FZleHgqHW8Qc3uCaVmEhC%2FBild_2023-01-31_222411309.png?alt=media&#x26;token=f752ffcf-33af-4887-bf0a-95e82ab492f9" alt=""><figcaption></figcaption></figure>

In this file you have to list all center item parent file.

<figure><img src="https://3895606765-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX4apUTCePUf0LhS4IMS%2Fuploads%2F1usUsavfxPz7jofUVi41%2FBild_2023-01-31_233937229.png?alt=media&#x26;token=f9bfe3ea-33dd-4834-9037-901ca390c994" alt=""><figcaption></figcaption></figure>

* <mark style="color:red;">Here you have to enter the item id of the center item. If it is a custom item, only use the item id and nothing else.</mark>

* <mark style="color:green;">Replace this with your data pack name space.</mark>

* <mark style="color:purple;">Replace this with the folder and</mark> <mark style="color:purple;">center item parent file that have the same name as your center item.</mark>

## Done:

If you did everything right you can now put the data pack in the `datapack` folder of your world and after a `/reload` command you should be able to craft your new recipe.
