Add Custom Recipes

In this page we'll explain how you can add your own crafting recipes. To create custom recipes, you'll have a create a datapack.

## Create your own datapack

In the following steps, we'll be explaining how to create your own custom Jobs+ datapack.

### 2. Edit the 'pack.mcmeta' file in the datapack.

After downloading the example datapack from the link above, we'll have to edit the "pack.mcmeta" to fit the right Minecraft version.

All we have to do here is edit the description to a description that fits your datapack and change the "pack\_format" to the right version.

For the right value go to Pack Format at the Minecraft wiki. For example, 1.19.2 is "pack\_format" 9 and 1.18.2 is "pack\_format" 8.

### 3. Create your own Jobs+ recipe.

#### 3.1. Create a JSON file.

1. Open the example datapack and go to data -> jobsplus -> recipes.
2. right-click on the oak\_planks.json and click on "copy".
3. Now click on an empty space in the same folder and click on "paste".
4. Change the name of the file to the name of the item you want to craft.
	1. For example, cobblestone, diamond\_helmet or turtle\_egg.

#### 3.2. Edit the JSON file.

To edit the JSON file, please use a good file editing software that supports json file editing. (don't use the default notepad from Windows.) Some good free ones are Sublime Text (My personal favorite), Atom and Notepad++. Once you've opened the JSON file with a good editor, we can begin editing the JSON file.

1. Don't change the type. As of writing this article, "**jobsplus:construction**" is the only crafting type. This type works the same as the default Minecraft "minecraft:shaped\_recipe" but has a 5 by 5 crafting grid instead of 3 by 3 and adds the "job" and "requiredLevel" keys.
2. Under "**result**" change the count to the number of items you want to be crafted.
3. Under "**result**" change the item to the item you want to be crafted. (You can also change "item" to "tag" if you want to use in-game tags.)
```
"result": {
 "count": 1,
 "item": "minecraft:diamond"
},

```
4. Under "**key**" change the item in "A" to an item you want to be used in the crafting recipe.
5. If your crafting recipe requires more than 1 item, you can add a second item like this:
```
"key": {
 "A": {
 "item": "minecraft:oak\_log"
 },
 "B": {
 "item": "minecraft:iron\_ingot"
 }
},

```
6. In "**pattern**" create the crafting pattern you want for your recipe. Here you'll HAVE TO use all of the "keys" from step 5. Example:
```
"pattern": [
 "AAAAA",
 "AAAAA",
 "AABAA",
 "AAAAA",
 "AAAAA"
],

```
This pattern in combination with the keys from step 5 will require 24 oak planks with an iron ingot in the middle. Note that you make the pattern any size as long as it is not bigger than 5 by 5 and the width has to be the same on every line (So "AAA", "AAA" would be valid but "AA", "AAA" wouldn't because the first one is 2 characters wide and the second one is 3 characters wide.)
7. Last but not least, you'll have to assign a **job** and **required level** to the recipe. This is done by adding the following 2 lines to the recipe:
```
"job": "MINER",
"requiredLevel": 55

```
Note that the "**requiredLevel**" has to be between 1 and 100. So, 0 and 101 are invalid since they can't be reached. The job has to be in all caps. (ALCHEMIST, BUILDER, DIGGER, ENCHANTER, FARMER, FISHERMAN, HUNTER, LUMBERJACK, MINER and SMITH).
8. Finally, the JSON file will look something like this:
```
{
 "type": "jobsplus:construction",
 "result": {
 "count": 1,
 "item": "minecraft:diamond"
 },
 "key": {
 "A": {
 "item": "minecraft:oak\_log"
 },
 "B": {
 "item": "minecraft:iron\_ingot"
 }
 },
 "pattern": [
 "AAAAA",
 "AAAAA",
 "AABAA",
 "AAAAA",
 "AAAAA"
 ],
 "job": "MINER",
 "requiredLevel": 55
}

```

### Disable a vanilla recipe.

An example of disabling a vanilla recipe can be found in the example datapack.

1. Create a JOSN file with the name of the item you want to disable. (For example: "crafting\_table.json", "oak\_planks.json")
	1. If you're not sure what the name of the file is, that a look at this page from mcreator.
2. Open the JOSN file and paste the following JSON text into it to disable the recipe.
```
{
 "type": "minecraft:crafting\_shapeless",
 "ingredients": [
 {
 "item": "minecraft:barrier"
 }
 ],
 "result": {
 "item": "minecraft:barrier"
 }
}

```

### Disable a modded recipe.

Disabling a modded recipe is a little bit harder than disabling a vanilla one since you need to find the mod ID of the mod and the name of the JSON file to replace. The easiest way to do this is with WinRAR.

1. If you have WinRAR installed, right-click on the JAR file of the mod and click on open with WinRAR.
2. Once you opened the JAR file, go to the data folder.
3. This folder will contain a folder with the mod ID. For example, "immersiveengineering".
4. In your datapack zip file, go to the data folder and create a folder with this mod ID as its name.
5. In that folder, create a folder with the name "recipes".
6. To get the name of the recipe, go to WinRAR again and go to the recipes folder of the mod. For example, data -> immersiveengineering -> recipes.
7. In here search for the recipe you're looking for and create a file with the same name in your datapack recipes folder.
8. Open the file and paste the following JSON text into it.
```
{
 "type": "minecraft:crafting\_shapeless",
 "ingredients": [
 {
 "item": "minecraft:barrier"
 }
 ],
 "result": {
 "item": "minecraft:barrier"
 }
}

```

### Adding the datapack to your world.

If you want to add the datapack to your world. Go to the world folder and open the datapacks folder. All you'll have to do is put the datapack into that folder and restart your server.

### Adding the datapack to every world created (For Modpacks)

If you want to add the datapack you created to all the world a player creates, you'll have to use a mod like Global Packs.