How do I make a custom recipe using an item that came from a different custom recipe?

Discussion in 'Plugin Development' started by Markie129, Jun 5, 2021.

  1. Offline


    Title ☝
  2. Offline


    I had this same issue, the problem is custom recipe uses Material and not ItemStack. There might be a way to do it, but I haven't found any. Instead of a custom recipe, you can do a command or something along those lines that checks the player's inventory for the needed items, takes them if they're there, and gives the player the new item.

    Edit: The way most people do it is using PrepareItemCraftEvent. With that, I believe you can check if the ItemStacks in the Crafting GUI are correct and go from there. Refer to this link
    Last edited: Jun 6, 2021
  3. Offline


    When creating your custom recipe, when using RecipeChoice you need to use RecipeChoice.ExactChoice , not RecipeCoice.MaterialChoice.
    That will match the item exactly. If you have custom persistent data for example, it must match the exact persistent data. It is still possible to use items with custom persistent data, just make sure you have the data set to some kind of default for input and output.

    It's been a while since I have used the API, so it may still be experimental (I have not had any issues), and I'm pretty sure it is not available to 1.8.8.

Share This Page