> For the complete documentation index, see [llms.txt](https://docs.nexomc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexomc.com/general-usage/recipes/predicate-recipes.md).

# Predicate Recipes

Predicate-Recipes are recipes which have special conditions not tied to the vanilla system explicitly\
Currently Nexo comes with three main-types of Predicate-Recipes:

#### Amount-Predicate

This allows you to define the amount of a given Ingredient the recipe requires

<div align="left"><figure><img src="https://548966760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FunHnTA6FZG7Bnjt8znvq%2Famount.gif?alt=media&amp;token=e6e0d632-089c-4c4d-a761-247a0debc363" alt=""><figcaption><p>Recipe showing a specific amount of an Ingredient is required to craft</p></figcaption></figure></div>

```yaml
amount_test:
  result:
    minecraft_type: DIAMOND
    amount: 3
  ingredients:
    A:
      minecraft_type: IRON_INGOT
      amount: 2
    B:
      minecraft_type: GOLD_INGOT
      amount: 2
    C:
      minecraft_type: COPPER_INGOT
      amount: 2
```

#### Replacement-Predicate

This allows you to define an item which should remain after the recipe is crafted\
For example, a recipe which takes a Bucket Of Water, and leaves behind a Empty Bucket

*This recipe cannot be made through the in-game builders, only directly in files*

<div align="left"><figure><img src="https://548966760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2F874e2svh4N72vwtzrEA7%2Freplacement.gif?alt=media&amp;token=2971efc7-9a41-40b0-85b7-9eccf5397537" alt=""><figcaption><p>Recipe which leaves behind an empty Bucket after crafted</p></figcaption></figure></div>

```yaml
replacement_test:
  result:
    minecraft_type: POWDER_SNOW_BUCKET
  ingredients:
    A:
      minecraft_type: SNOWBALL
    B:
      minecraft_type: WATER_BUCKET
      replacement:
        minecraft_type: BUCKET
```

#### Durability Damage-Predicate

This allows you to define if an item should take durability damage, instead of immediatley being used up when crafting. For example a knife which takes damage when crafting meat

*This recipe cannot be made through the in-game builders, only directly in files*

<div align="left"><figure><img src="https://548966760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FUEgM7Z0GXsItYjWul6QC%2Fdamage.gif?alt=media&amp;token=95f79629-4c73-429c-be2b-b91f457a9ff5" alt=""><figcaption><p>Sword taking damage after "cutting up" Wood when crafting recipe</p></figcaption></figure></div>

```yaml
damage_test:
  result:
    nexo_item: bark
    amount: 8
  ingredients:
    A:
      tag: swords
      damage: 1
    B:
      tag: logs
```

#### Transmute Recipes

These are recipes which let you copy over data from one item onto another

<div align="left"><figure><img src="https://548966760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FkcWS0ckpLYjY2MjVB1Bj%2Fimage.png?alt=media&amp;token=466cc045-3e71-4fd9-8b08-d151a7098e93" alt=""><figcaption></figcaption></figure></div>

```yaml
forest_sword_to_axe:
  input:
    nexo_item: forest_sword
  material:
    minecraft_type: LAPIS_LAZULI
  result:
    nexo_item: forest_axe
  preserve:
  - damage
  - enchantments
  - custom_name
```
