Skip to content

Recipe | Result

WolfyScript edited this page Mar 7, 2022 · 10 revisions

Usually the result contains a single item at a time, but they can be configured with multiple items, from which it chooses one when crafted.
To set multiple items, you can shift + right-click on the result slot, and it will open the Result Options menu.

Result Options

Multiple Result Items

When using multiple items as the result, it selects a random item when the recipe is completed.
That is based on weight, that you can set inside the JSON, or just put more entries of the same item into the list, to increase it's weight.

Tags

Additionally, you Tags are groups of items for easier management of recipes.
The Tags Button will open the Tag settings to configure the tags and choose from a list of tags.



JSON

{
    "items" : [ /* Items to use as the result (See weighted results below) */ ],
    "tags" : [ /* Item tags that are added to the list of items */ ],
    "extensions" : [ /* Run extensions when the recipe is completed */ ],
    "target" : { /* Target specific recipe slots and manipulate the result */ }
}

Items & Weighted Results

By default, each item has a weight of 1, which results in a total weight sum equal to the amount of items. You can modify the weight of each item entry. Of course, that changes the sum of the weights too.

{
    "items" : [
        {
            //Optional weight value (double)
            "weight" : 1.4, 
            /*
             Other item settings.
             Like "item" (Spigot Itemstack), "itemsadder", "oraxen", etc.
            */
            "item" : {} 
        }
    ]
}

Tags

For tags, you need to use the format minecraft:<tag_name>.
See List of Item Tags! You can only use item tags!

{
    "tags" : [ 
        "minecraft:logs", //Any kind of log
        "minecraft:leaves", //Any kind of leaf
        //...more tags
    ]
}

Extensions

They allow you to further enhance the result with actions that are run when the recipe is completed.

{
    "extensions" : [
        {
            "key": "<namespace>:<key>", //The type of the extension
            //type specific settings...
        },
        //more extensions
    ]
}

More info about Result Extensions.

Target

These settings allow you to manipulate the result depending on the ingredient/s. You can target specific Ingredients and merge their NBT together into the resulting item.

{
    "target" : {
        "mergeOptions" : [ 
            {
                "slots" : [ 0 ],
                "adapters" : [ 
                    {
                        "key" : "customcrafting:enchant",
                        //Type specific options
                    }, 
                    {
                        "key" : "customcrafting:enchanted_book"
                    },
                    //...more adapters 
                ]
            },
            //...more merge options. e.g. to target other slot combinations 
        ]
    }
}

More info about Result Targets

| Home

  • Editions
  • Installation

| General

  • Performance
  • Terminology

| Recipes

Types

  • From 1.6.5.x
  • From 1.6.4.0
  • From 1.6.3.0 or older

| Special Workstations

  • Custom Recipe Book
  • Vanilla Recipe Book
Clone this wiki locally