Custom recipes with custom item ?

Discussion in 'Plugin Development' started by Coznix, May 17, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    Coznix

    Hi !
    Is it possible to create custom recipes with custom item (like an item with a specify custom name, custom model data and custom attribute modifiers)
    If yes how, can i do that ?
    Version: 1.15.2
     
    Last edited: May 17, 2020
  2. Offline

    Niv-Mizzet

  3. Offline

    Coznix

    I didnĀ“t understand but thank u, maybe I'll request that plugin. I've never made a plugin haha. I need custom recipes for my server
     
  4. Offline

    jxcd

    After you create a new ItemStack, you can set the item's meta and lore. If you use ShapedRecipe you can set the shape using itemRecipe.shape("#$#", "# #", "# #") where each # is a different item in the 3x3 crafting table grid. Use a space instead of a symbol for a blank crafting table slot. Then you can set the symbols as different 'ingredients' using itemRecipe.setIngredient('#', Material.(material)); for example.
    Remember to add the recipe using plugin.getServer().addRecipe(itemRecipe); at the end of your code.
     
  5. Offline

    Niv-Mizzet

    @jxcd o lol that's a way better thing to do than what I said.
     
Thread Status:
Not open for further replies.

Share This Page