Giter Site home page Giter Site logo

prismarine-recipe's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar epirito avatar icetank avatar idanho avatar jarco-dev avatar psu-de avatar rom1504 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

prismarine-recipe's Issues

return ingredients null bot.recipesAll(item.id, null, craftingTable)

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 3.7.0
  • server: vanilla 1.16.5
  • node: 14.15.1

Detailed description of a problem

I need to know what ingredients are used to create an item,
The recipe returns null ingredients used

I need this so that the "BOT" knows what ingredients to take from the chest

What did you try yet?

recipesAll mus be appear all recipes & ingredients, right?

amount = parseInt(amount, 10)
  const mcData = require('minecraft-data')(bot.version)
  const item = mcData.findItemOrBlockByName('stone_sword')
  // mcData.itemsByName.pumpkin_seeds

  const craftingTableID = mcData.blocksByName.crafting_table.id

  const craftingTable = bot.findBlock({
    matching: craftingTableID,
    maxDistance: 3
  })

  if (!item) {
    bot.chat(`unknown item: ${name}`)
    return
  }

  const aviableRecipes = bot.recipesAll(item.id, null, craftingTable)

Variables:

image

Related issue PrismarineJS/mineflayer#2001

Invalid Typescript declarations

Hello,
when working with prismarine-recipe and typescript I noticed that the RecipeItemConstructor Type is wrong and the default export is also not correct.

Currently, in index.d.ts:

export type RecipeItemConstructor = typeof Recipe;

Should be:

export type RecipeItemConstructor = typeof RecipeItem;

also the loader function is not declared as the default export:

export declare function loader(mcVersion: string): RecipeClasses;

what should be

declare function loader(mcVersion: string): RecipeClasses;
export default loader;

Typescript compile error

Mineflayer requires importing the Recipe type but it's not exported thus it throws a error when ever you're building your project.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.