prismarine-recipe
Represent minecraft recipes
Last updated 8 months ago by GitHub Actions .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install prismarine-recipe 
SYNC missed versions from official npm registry.

prismarine-recipe

Build Status

Represent minecraft recipes

Usage

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 :

{
  id:45,
  metadata:3,
  count:1
}

recipe.inShape

Looks like this:

[
  [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:

[
  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:

[
  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

Current Tags

  • 1.5.0                                ...           latest (8 months ago)

9 Versions

  • 1.5.0                                ...           8 months ago
  • 1.4.0                                ...           8 months ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 30
Today 0
This Week 0
This Month 18
Last Day 0
Last Week 1
Last Month 4
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE