Solved Custom Recipe 1.13.2

Discussion in 'Plugin Development' started by jerskisnow, Feb 9, 2019.

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


    Hello, thanks for reading my thread.

    I wanted to make custom recipes with the following code:
            ItemStack oakBoat = new ItemStack(Material.OAK_BOAT);
            NamespacedKey oakBoatKey = new NamespacedKey(plugin, "oakboat_key");
            ShapedRecipe oakBoatRecipe = new ShapedRecipe(oakBoatKey, oakBoat);
            oakBoatRecipe.shape("LLL", "SLS", "CLC");
            oakBoatRecipe.setIngredient('L', Material.OAK_LOG);
            oakBoatRecipe.setIngredient('S', Material.STICK);
            oakBoatRecipe.setIngredient('C', Material.COBBLESTONE);
    And it worked fine.

    But my question is how can I get something like this
    So that the item changes, depending on the wood sort, and that I can use different sorts of wood/logs to make a boat. I tried it by creating the code above with every woodsort but then 1 had different boats in the craftingbook, and I want all the boatsorts under one boat just like the gif but then with my custom recipe.

    Thanks in advance.
  2. Offline



    on my side I registered several recipes with each different wood types. I don't know if it's the way to do but it works...
  3. Offline


    I actually solved the problem, you can use recipe.setGroup(String); if you want to group a few different recipes (with different rewards) together, like boats. If you want to use for example multiple wood sorts for 1 and the same item you can use recipe.setIngredient(char, MaterialChoice);
Thread Status:
Not open for further replies.

Share This Page