Skip to content

Result Target

WolfyScript edited this page Feb 4, 2023 · 12 revisions

Result Targets target specified ingredient slots in the recipe and merge specific NBT into the result.

This makes it possible to handle variable NBT tags in recipes that should have an impact on the result, without creating hundreds (or thousands) of variations of a recipe, or coding your own complex recipe.
These NBT Tags could be enchantments, damage, or an item name that should be transferred to the result.

Configure

"result" : {
    "target" : {
        "mergeOptions" : [ 
            {
                "slots" : [ 0 ], //The slots to target
                "adapters" : [ 
                    {
                        "key" : "customcrafting:enchant"
                    }, 
                    {
                        "key" : "customcrafting:enchanted_book"
                    }
                    //...optional more adapters 
                ]
            }
            //...optional other merge options 
        ]
    }
    //...other result options
}

In the recipe config, you need to add the target field to your result.
Inside that target, you need to add the mergeOptions array field.

Now you are able to set as many MergeOptions as you want.
Each merge option consists of:
slots – The slots to target in the recipe.
adapters – The adapters to use for the selected slots.

Included Adapters

Advanced Users (or Third-party Plugins): You can code and register your own adapter.

Custom Adapter

TODO

| 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