# Info Client Recipes

<Callout variant='info'>
Prior to RRV 6.5.0, the path to info recipes was `rrv_info`, not `rrv/recipe`. `rrv_info` no longer functions in versions 7.0.0 and above..
</Callout>

RRV provides a format for info recipes, allowing modpacks (or mods!) to show information about an item or item tag through resource packs. These JSON files should be added to a `assets/<namespace>/rrv/recipe` folder in your resource pack.

## Examples

The `key` entry can be supplied with either an item tag, an item, a list of items, or an item stack. The `text` entry should be supplied with a translation key.

### Chest Boats (Item Tags)

Recipe file - `assets/rrv/rrv/recipe/chest_boats.json`
```json
{
  "type": "rrv:info",
  "key": "#minecraft:chest_boats",
  "text": "rrv.info.chest_boats"
}
```
Language file - `assets/rrv/lang/en_us.json`
```json
{
"rrv.info.chest_boats": "A boat in a chest!"
}
```

### Stone (Items)

Recipe file - `assets/rrv/rrv/recipe/stone.json`
```json
{
  "type": "rrv:info",
  "key": "#minecraft:stone",
  "text": "rrv.info.stone"
}
```
Language file - `assets/rrv/lang/en_us.json`
```json
{
"rrv.info.stone": "Stone can be found underground."
}
```

## API

Info recipes can also be added programmatically via a mod's client integration.

```java
ItemView.addClientReloadCallback(() -> {
    ItemView.addInfoRecipe(new InfoClientRecipe(Identifier.fromNamespaceAndPath("example-mod", "stone"), SlotContent.of(Items.STONE), "Stone can be found underground."));
    ItemView.addInfoRecipe(new InfoClientRecipe(Identifier.fromNamespaceAndPath("example-mod", "stone"), SlotContent.of(Items.STONE), Component.translatable("rrv.info.stone")));
});
```
