top of page

Adding Groups to Custom Crafting Recipes

Updated: Jan 23, 2023

Heads up! This tutorial is a continuation of a previous tutorial on creating custom recipes.

It also requires a Data Pack to work.

If you haven't done the previous tutorial, you can use this file.




Here's a quick tutorial on adding Item Groups to your recipes.


Item Groups allow you to bunch similar recipes together in your Knowledge Book.


The recipe at the bottom is an example.

It will allow you to combine gunpowder, cobblestone, and flint to make a Fire Charge, which acts like a single-use Flint & Steel.

(The idea is that players can use it to open a portal without needing iron.)


The point of the group is to allow players to easily find and craft these flint-related items.

So, we'll call the group "flint". Groups are Case Sensitive, but capitalization isn't required.


To add a group to your recipe, add the highlighted area to the end of it:

{
    "type": "minecraft:crafting_shapeless",
    "ingredients": [
        {
            "item": "minecraft:cobblestone"
        },
        {
            "item": "minecraft:flint"
        },
        {
            "item": "minecraft:gunpowder"
        }
    ],
    "result": {
        "item": "minecraft:fire_charge",
        "count": 2
    },
    "group": "flint"
}

This will tell Minecraft that any Crafting Table recipe with the same group name should be paired together.


To see it in action, we'll add a second recipe to this group.


This recipe will let players make flint from gravel easier.

Remember, we're keeping the "flint" group.

{
    "type": "minecraft:crafting_shapeless",
    "ingredients": [
        {
            "item": "minecraft:gravel"
        }
    ],
    "result": {
        "item": "minecraft:flint",
        "count": 1    
    },
    "group": "flint"
}

Now, if we install this into our data pack and run it...

ree

...you can see that it now shows both recipes in one space, making it easy to craft them both.


This can be done for any recipe you create, regardless of if they are even related to each other.

The only thing is that they both need to be recipes from the same block.

For instance, you can't group a Furnace recipe with a Crafting Table recipe.

This is because a Furnace recipe wouldn't show up in a Crafting Table, and vise versa.


Remember: you can always edit the files to be whatever you want. As long as it follows the guide, you can make any recipe you want.

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

Created by Professional Loser, 2023. This site is unaffiliated with Minecraft™ or Mojang.

bottom of page