# Recipes

As with [models](https://wiki.modernmodpacks.site/wiki/hellish-mods/digitality/resource-packs/models) and [tags](https://wiki.modernmodpacks.site/wiki/hellish-mods/digitality/data-packs/tags), recipes also have subtypes, for now digitality only supports shapeless crafting recipes, but we are aiming to expand the support in the future.

## Shapeless crafting

```java
data.shapelessRecipe("<recipe id>", new ItemTemplate("<item name>", "<item count (optional)>"), <ArrayList of ingredient names/ingredient 1>, "<ingredient 2>"...);
```

{% code title="Example" %}

```java
// This code registers the "funnymod:test" recipe that produces 2 sticks and uses a diamond block and a golden carrot as the ingredients
VirtualDataPack data = new VirtualDataPack("funnymod");
data.shapelessRecipe("test", new ItemTemplate("minecraft:stick", 2), "minecraft:diamond_block", "minecraft:golden_carrot");
```

{% endcode %}

<figure><img src="https://3462309945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff9DP8gpELIkQ3U8skuPM%2Fuploads%2FhUKDhokL8l1x0YY6gHXU%2Fimage.png?alt=media&#x26;token=375fb130-1e31-49af-9556-8daf6dd8643b" alt=""><figcaption><p>In-game demonstration</p></figcaption></figure>
