# prismarine-recipe

> Represent minecraft recipes

Latest version **1.5.0** (published 2026-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install prismarine-recipe
pnpm add prismarine-recipe
yarn add prismarine-recipe
bun add prismarine-recipe
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2026-03-30 |
| First published | 2015-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 11 |
| Author | Romain Beaumont |
| Maintainers | rom1504 |
| Keywords | minecraft, recipe |

## Links

- npm: https://www.npmjs.com/package/prismarine-recipe
- Repository: https://github.com/PrismarineJS/prismarine-recipe
- Homepage: https://github.com/PrismarineJS/prismarine-recipe#readme
- Issues: https://github.com/PrismarineJS/prismarine-recipe/issues
- npm.io page: https://npm.io/package/prismarine-recipe

## Recent versions

- 1.5.0 (latest) — 2026-03-30
- 1.4.0 — 2026-03-30
- 1.3.1 — 2022-12-29
- 1.3.0 — 2022-10-11
- 1.2.0 — 2022-04-11
- 1.1.0 — 2020-05-16
- 1.0.1 — 2016-05-30
- 1.0.0 — 2016-02-19
- 0.0.0 — 2015-11-22

## README

# prismarine-recipe

[![Build Status](https://github.com/PrismarineJS/prismarine-recipe/workflows/CI/badge.svg)](https://github.com/PrismarineJS/prismarine-recipe/actions?query=workflow%3A%22CI%22)

Represent minecraft recipes

## Usage

```js
const Recipe=require("prismarine-recipe")("1.8").Recipe;

console.log(JSON.stringify(Recipe.find(5)[0],null,2)); // recipes for wood
```

## API

### Recipe

#### Recipe.find(itemType, [metadata])

Returns a list of matching `Recipe` instances.

 * `itemType` - numerical id
 * `metadata` - metadata to match. `null` means match anything.

#### recipe.result

The output item. It's a recipeItem :
```js
{
  id:45,
  metadata:3,
  count:1
}
```

#### recipe.inShape

Looks like this:

```js
[
  [recipeItem, recipeItem],
  [recipeItem, recipeItem],
  [recipeItem, recipeItem],
]
```

#### recipe.outShape

Looks the same as `inShape`. Only relevant for cake.

#### recipe.ingredients

List of shape-independent ingredients. Looks like this:

```js
[
  recipeItem,
  recipeItem
]
```

#### recipe.requiresTable

Boolean.

#### recipe.delta

Map of item type to how much more or less you will have after you use
the recipe.

This is what it looks like for the chest recipe:

```js
[
  recipeItem,
  recipeItem
]
```

## History

### 1.3.0

* mcData to registry refactoring (@Epirito)
* Fixed RecipeItemConstructor Type and default export (@psu-de)

### 1.2.0

* Bump mcdata

### 1.1.0

* typescript definitions (thanks @IdanHo)

### 1.0.1

* bump mcdata

### 1.0.0

* bump dependencies

### 0.0.0

* Import from mineflayer

---
_Source: https://npm.io/package/prismarine-recipe · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
