### Get the first page from the target and add it to the result Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Book-Meta This example demonstrates how to retrieve the first page of a target item using its index (0) and add it to the result. Negative indexes can be used to reference pages from the end. `copyPages` must be `true`. ```json5 { key: "customcrafting:book", copyPages: true, pages: [ { index: 0 // Note: if the index is bigger/smaller than the amount of pages, then it wraps around. // Tip: negative indexes start from the end of the page list. } ] } ``` -------------------------------- ### Targeting Ingredients and Merging Enchants Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.2-Result-Targets This example targets the first ingredient of a recipe to merge its enchantments into the result. It also handles enchantments from enchanted books. ```json "result" : { "target" : { "mergeOptions" : [ { "slots" : [ 0 ], "adapters" : [ { "key" : "customcrafting:enchant" }, { "key" : "customcrafting:enchanted_book" } ] } ] } }, ``` -------------------------------- ### Example Result Extension Implementation Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.1-Result-Extensions An example of a custom ResultExtension. It includes a test value, a default constructor, a copy constructor, and overrides for various crafting events. Serialization is handled by Jackson, so use @JsonIgnore for non-serialized fields. A clone() method is recommended. ```java public class ExampleResultExtension extends ResultExtension { private int testValue; public ExampleResultExtension () { super(new NamespacedKey("your_namespace", "example")); //NamespacedKey must be unique! It is recommended to use your plugin name as the namespace (lowercase, underscores instead of spaces!). } public ExampleResultExtension (ExampleResultExtension extension) { super(extension); this.testValue = extension.testValue; } @Override public void onWorkstation(Block block, @Nullable Player player) { //Only called when a workstation block exists } @Override public void onLocation(Location location, @Nullable Player player) { //Called when a craft is completed by either a player or Workstation } @Override public void onPlayer(@NotNull Player player, Location location) { //Only called when a Player exists that caused the craft } @Override public ExampleResultExtension clone() { return new ExampleResultExtension(this); } } ``` -------------------------------- ### Merge Enchantments Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Enchantments Configure the merge enchantment behavior using JSON5. This example shows how to ignore enchant limits and conflicts, add new enchantments like Unbreaking and Sharpness, and upgrade existing enchantments like Looting and Unbreaking. ```json5 { "key": "customcrafting:enchant", "ignoreEnchantLimit": true, "blackListedEnchants": [], "ignoreConflicts": true, "ignoreItemLimit": true, "increaseLevels": false, //Adds Unbreaking 3 and Sharpness 1 to the item if it doesn't exist "addEnchants": { "minecraft:unbreaking": 3, "minecraft:sharpness": 1 }, //Upgrades Looting by 1 level and Unbreaking by 2 levels "upgradeEnchants": { "minecraft:looting": 1, "minecraft:unbreaking": 2 } } ``` -------------------------------- ### Import MergeAdapter Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.2-Result-Targets Import the necessary MergeAdapter class from the WolfyScript library. ```java import me.wolfyscript.customcrafting.recipes.items.target.MergeAdapter ``` -------------------------------- ### Basic NBT Merge Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-NBT This is the basic structure for the nbt/merge adapter. It requires a key and an NBTQuery object. ```hocon { key : "customcrafting:nbt/merge" query { // NBTQuery } } ``` -------------------------------- ### Import CCClassRegistry Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.2-Result-Targets Import the CCClassRegistry for registering custom adapters. ```java import me.wolfyscript.customcrafting.CCClassRegistry; ``` -------------------------------- ### Take the first and last target page and add it to the beginning Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Book-Meta This snippet shows how to insert the first and last pages of a target item at the very beginning of the result's pages. Set `copyPages` to `true` and `insertAtPage` to `0`. ```json5 { key: "customcrafting:book", copyPages: true, insertAtPage: 0, lines: [ { index: 0 }, { index: -1 } ] } ``` -------------------------------- ### Import ResultExtension Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.1-Result-Extensions Import the necessary abstract class for creating custom result extensions. ```java import me.wolfyscript.customcrafting.utils.recipes.items.extension.ResultExtension; ``` -------------------------------- ### Command Execution Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extension-|-Command Defines commands to be executed when a craft is completed. Supports console and player commands, with options for placeholder usage and proximity checks. ```json { "key" : "customcrafting:command", "outer_radius" : [ 0.0, 0.0, 0.0 ], "inner_radius" : [ 0.0, 0.0, 0.0 ], "consoleCommands" : [ "say hi %player%", "effect give %player% minecraft:strength 100 100" ], "playerCommands" : [ ], "nearPlayer" : true, "nearWorkstation" : true } ``` -------------------------------- ### Add First and Last Banner Patterns to Beginning Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Banner Insert the first and last patterns of the target item at the very beginning of the result patterns by setting `insertAtIndex` to 0. ```json5 { key: "customcrafting:banner", insertAtIndex: 0, patterns: [ { index: 0 }, { index: -1 } ] } ``` -------------------------------- ### Generic Extension Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.1-Result-Extensions Shows the common structure for any extension, including its key and radius settings for defining the affected area. ```json { "key": "namespace:key", "outer_radius": [0.0, 0.0, 0.0], "inner_radius": [0.0, 0.0, 0.0], ... } ``` -------------------------------- ### MythicMobs Spawn Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extension-|-MythicMobs Use this JSON configuration within CustomCrafting to define mob spawning parameters upon crafting. Specify mob name, level, and spawn area. ```json { "key" : "customcrafting:mythicmobs/mob_spawn", "outer_radius" : [ 0.0, 0.0, 0.0 ], "inner_radius" : [ 0.0, 0.0, 0.0 ], "mobName" : "MobName", "mobLevel" : 10, "offset" : [ 0.5, 1.0, 0.5 ] } ``` -------------------------------- ### Result Extensions Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Recipe-|-Result Define extensions to perform actions when a recipe is completed. Each extension has a key specifying its type and type-specific settings. ```json5 { "extensions" : [ { "key": ":", //The type of the extension //type specific settings... }, //more extensions ] } ``` -------------------------------- ### Add First and Last Lore Lines at Beginning Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Display-Lore This snippet shows how to insert the first and last lore lines from the target item to the beginning of the result item's lore. ```json5 { key: "customcrafting:display_lore", insertAtIndex: 0, lines: [ { index: 0 }, { index: -1 } ] } ``` -------------------------------- ### Using Item Tags as Results Source: https://github.com/wolfyscript/customcrafting/wiki/Recipe-|-Result Specify item tags to include a variety of items as the recipe result. The format requires a namespace, such as 'minecraft:'. ```json5 { "tags" : [ "minecraft:logs", //Any kind of log "minecraft:leaves", //Any kind of leaf //...more tags ] } ``` -------------------------------- ### Result Extension Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extensions Configuration for a result extension within a recipe. Specifies the extension's key, radii, and execution type. ```hocon result { items: [ ], tags: [ ], target { }, extensions : [ { key: ":", outer_radius: [0.0, 0.0, 0.0], inner_radius: [0.0, 0.0, 0.0], executionType: ONCE //...other type specific settings }, //more extensions ], //Other result settings } ``` -------------------------------- ### Configure Result Target with Merge Options Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Target This JSON configuration defines how NBT data from specific ingredient slots should be merged into the crafting result. It specifies target slots and the adapters to use for merging. ```json "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 } ``` -------------------------------- ### Add All Banner Patterns Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Banner Include all patterns from the target item into the result. This is achieved by providing an empty pattern object, which defaults to a true condition. ```json5 { key: "customcrafting:banner", patterns: [ { } // Condition is true by default, and matches each pattern ] } ``` -------------------------------- ### Damage Merge Adapter Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Damage Configuration for the customcrafting:damage merge adapter. Sets repairBonus to true and additionalDamage to 0. ```json { "key": "customcrafting:damage", "repairBonus": true, "additionalDamage": 0 } ``` -------------------------------- ### Basic Recipe Result Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Recipe-|-Result This is the fundamental JSON structure for defining recipe results, including items, tags, extensions, and target options. ```json5 { "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 */ } } ``` -------------------------------- ### Copy All NBT Tags Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-NBT Use 'includeAll: true' within the query to copy all NBT tags from the source items to the result. This is a simple way to transfer all item data. ```hocon { key: "customcrafting:nbt/merge" query { includeAll: true } } ``` -------------------------------- ### Custom Crafting Sound Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extension-|-Sound Configure the sound to be played when a custom crafting recipe is completed. This JSON object defines the sound effect, its properties, and the conditions under which it should play. ```json { "key" : "customcrafting:sound", "outer_radius" : [ 0.0, 0.0, 0.0 ], "inner_radius" : [ 0.0, 0.0, 0.0 ], "sound" : "BLOCK_ANVIL_USE", "volume" : 1.0, "pitch" : 1.0, "soundCategory" : "BLOCKS", "forPlayer" : false, "nearPlayer" : false, "nearWorkstation" : false, "onBlock" : true } ``` -------------------------------- ### Add all target pages to the result Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Book-Meta To include all pages from the target item in the result, use an empty `lines` array with `copyPages` set to `true`. The default condition ensures all pages are matched. ```json5 { key: "customcrafting:book", copyPages: true, lines: [ { } // Condition is true by default, and matches each page ] } ``` -------------------------------- ### Add All Target Lines Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Display-Lore Use this snippet to include all lines from the target item's lore into the result item. The default condition is true, matching every line. ```json5 { key: "customcrafting:display_lore", lines: [ { } // Condition is true by default, and matches each line ] } ``` -------------------------------- ### Brewing Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Brewing-Recipes This is the base structure for defining a custom brewing recipe. Ensure brewing is enabled in config.yml. Use this as a template for your own recipes. ```json { "@type" : "customcrafting:brewing_stand", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : true, "conditions" : { "values" : [ /* Conditions */ ] }, "allowedItems" : { /* Ingredient settings */ }, "ingredients" : { /* Ingredient settings */ }, "fuelCost" : 1, "brewTime" : 80, "durationChange" : 0, "amplifierChange" : 0, "resetEffects" : false, "effectColor" : null, "effectRemovals" : [ ], "result" : { /* Result settings */ }, "effectAdditions" : [ ], "effectUpgrades" : [ ] } ``` -------------------------------- ### Result Structure with Extensions Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.1-Result-Extensions Defines the structure for the 'result' object in a recipe, including the 'extensions' array where custom actions are configured. ```json "result": { "items": [], "tags": [], "extensions": [ { }, { }, ... ] } ``` -------------------------------- ### Ingredient Options JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Recipe-|-Ingredient This JSON structure defines the options for a recipe ingredient, allowing for multiple items, tag-based item selection, and control over replacement behavior. ```json { "replaceWithRemains" : true, "allowEmpty" : false, "items" : [ /* Items that can be used in the ingredient slot */ ], "tags" : [ /* Item tags that are added to the list of items */ ] } ``` -------------------------------- ### Registering a Custom Result Extension Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extensions Registers a custom result extension with CustomCrafting using the Registry. This should be done in the plugin's onLoad() method. ```java import me.wolfyscript.customcrafting.Registry; @Override public void onLoad() { getLogger().info("Registering Result Extension"); Registry.RESULT_EXTENSIONS.register(new ExampleResultExtension()); } ``` -------------------------------- ### Take a specific page from an item and add it to the result Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Book-Meta Use this snippet to copy a specific page identified by its content value from a target item to the result. Ensure `copyPages` is set to `true`. ```json5 { key: "customcrafting:book", copyPages: true, pages: [ { value: "The page contents" } ] } ``` -------------------------------- ### Add First Banner Pattern by Index Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Banner Retrieve and add the first pattern from the target item to the result using its index. Negative indexes can be used to count from the end. ```json5 { key: "customcrafting:banner", patterns: [ { index: 0 // Note: if the index is bigger/smaller than the amount of patterns, then it wraps around. // Tip: negative indexes start from the end of the pattern list. } ] } ``` -------------------------------- ### Weighted Result Items Source: https://github.com/wolfyscript/customcrafting/wiki/Recipe-|-Result Configure multiple items as potential results, where each item has a weight influencing its selection probability. Higher weights mean a higher chance of being chosen. ```json5 { "items" : [ { //Optional weight value (double) "weight" : 1.4, /* Other item settings. Like "item" (Spigot Itemstack), "itemsadder", "oraxen", etc. */ "item" : {} } ] } ``` -------------------------------- ### Create Custom MergeAdapter Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.2-Result-Targets Extend the MergeAdapter class to create a custom result target. Requires a default constructor and a copy constructor. The merge method defines how the result item is modified. ```java public class TestMergeAdapter extends MergeAdapter { public TestMergeAdapter() { super(new NamespacedKey("your_namespace", "the_key_of_your_adapter")); // } public TestMergeAdapter(TestMergeAdapter adapter) { super(adapter); //This should copy all your values you have in your object. } @Override public ItemStack merge(RecipeData recipeData, @Nullable Player player, @Nullable Block block, CustomItem customResult, ItemStack result) { /* Add your code to edit the result here. */ return result; //And return the edited result. } @Override public MergeAdapter clone() { return new TestMergeAdapter(this); } } ``` -------------------------------- ### Register Custom MergeAdapter Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.2-Result-Targets Register an instance of your custom MergeAdapter in the plugin's onLoad() method to make it available for use in recipes. ```java @Override public void onLoad() { getLogger().info("Registering Result Merge Adapters"); CCClassRegistry.RESULT_MERGE_ADAPTERS.register(new TestMergeAdapter()); } ``` -------------------------------- ### Shapeless Crafting Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Crafting-Recipes Defines the JSON structure for a shapeless crafting recipe. Use this for recipes where ingredient order does not matter. Ensure all required fields are populated. ```json { "@type" : "customcrafting:crafting_shapeless", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : true, "conditions" : { "values" : [ /* Conditions */ ] }, "result" : { /* Result settings */ }, "ingredients" : [ { //Ingredient settings }, //...ingredients ] } ``` -------------------------------- ### Anvil Recipe JSON Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Anvil-Recipes This JSON structure defines an Anvil recipe. It includes settings for recipe type, ingredients, result modes, blocking options, and repair cost. Use this as a template for creating custom anvil recipes. ```json { "@type" : "customcrafting:anvil", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : false, "conditions" : { "values" : [ /* Conditions */ ] }, "blockRepair" : false, "blockRename" : false, "blockEnchant" : false, "repairTask" : { /* * Type of the repair task: * - customcrafting:default * - customcrafting:durability * - customcrafting:result */ "key" : "customcrafting:durability", "durability" : 24 }, "repairCost" : 1, "applyRepairCost" : true, "repairCostMode" : "NONE", "base" : { /* Result settings */ }, "addition" : { /* Ingredient settings */ } } ``` -------------------------------- ### Advancement Result Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extension-|-Advancement This JSON configuration defines the parameters for the advancement result extension. It specifies the advancement to target, whether to revoke it, and optionally, specific criteria. ```json { "key" : "customcrafting:advancement", "outer_radius" : [ 0.0, 0.0, 0.0 ], "inner_radius" : [ 0.0, 0.0, 0.0 ], "advancement" : "minecraft:husbandry:tactical_fishing", "revoke" : false, "criteria" : null, "nearPlayer" : false, "nearWorkstation" : false } ``` -------------------------------- ### Cauldron Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Cauldron-Recipes Defines the structure for a custom cauldron crafting recipe. Specifies properties like cooking time, water level, experience, ingredients, and result. Ensure 'dropItems' is disabled if 'handItem' is used. ```json { "@type" : "customcrafting:cauldron", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : true, "conditions" : { "values" : [ /* Conditions */ ] }, "cookingTime" : 60, "waterLevel" : 1, "xp" : 5, "handItem" : null, "ingredients" : { /* Ingredient settings */ }, "dropItems" : true, "needsFire" : true, "needsWater" : true, "result" : { /* Result settings */ } } ``` -------------------------------- ### Custom Smithing Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Smithing-Recipes This is the base JSON structure for defining a custom smithing recipe. It includes settings for ingredients, enchantments, and conditions. ```json { "@type" : "customcrafting:smithing", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : false, "conditions" : { "values" : [ /* Conditions */ ] }, "base" : { /* Ingredient settings */ }, "addition" : { /* Ingredient settings */ }, "preserveEnchants" : false, "preserveDamage" : true, "onlyChangeMaterial" : false, "result" : { /* Result settings */ } } ``` -------------------------------- ### Custom Result Extension Base Class Source: https://github.com/wolfyscript/customcrafting/wiki/Result-Extensions Base class for creating custom result extensions. Requires a default constructor and implements methods for different execution contexts. ```java import me.wolfyscript.customcrafting.utils.recipe_item.extension.ResultExtension; public class ExampleResultExtension extends ResultExtension { private int testValue; public ExampleResultExtension () { super(new NamespacedKey("your_namespace", "example")); //NamespacedKey must be unique! It is recommended to use your plugin name as the namespace (lowercase, underscores instead of spaces!). } public ExampleResultExtension (ExampleResultExtension extension) { super(extension); this.testValue = extension.testValue; } @Override public void onWorkstation(Block block, @Nullable Player player) { //Only called when a workstation block exists } @Override public void onLocation(Location location, @Nullable Player player) { //Called when a craft is completed by either a player or Workstation } @Override public void onPlayer(@NotNull Player player, Location location) { //Only called when a Player exists that caused the craft } @Override public ExampleResultExtension clone() { return new ExampleResultExtension(this); } } ``` -------------------------------- ### Advancement Extension Configuration Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.1-Result-Extensions Configures the Advancement Extension to grant or revoke advancements or specific criteria for players. Available since v2.16.0.0-beta4. ```json { "key" : "customcrafting:advancement", "outer_radius" : [ 0.0, 0.0, 0.0 ], "inner_radius" : [ 0.0, 0.0, 0.0 ], "advancement" : "minecraft:husbandry/tactical_fishing", "revoke" : false, "criteria" : null, "nearPlayer" : false, "nearWorkstation" : false } ``` -------------------------------- ### Add Specific Banner Pattern by Value Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Banner Use this snippet to add a banner pattern to the result based on its specific properties like type and color. ```json5 { key: "customcrafting:banner", patterns: [ { value: { type: TRIANGLE_TOP, dyeColor: LIME } } ] } ``` -------------------------------- ### Custom Furnace Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Cooking-Recipes This JSON structure defines a custom furnace recipe. It includes fields for recipe type, group, visibility, conditions, ingredients, cooking time, experience, and the resulting item. Configure the '@type' field to specify the exact furnace type (e.g., customcrafting:furnace, customcrafting:blast_furnace). ```json { /* * The type of the recipe: * - customcrafting:furnace * - customcrafting:blast_furnace * - customcrafting:smoker * - customcrafting:campfire */ "@type" : "customcrafting:furnace", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : true, "conditions" : { "values" : [ /* Conditions */ ] }, "source" : { /* Ingredient settings */ "items" : [ ], "tags" : [ ], "replaceWithRemains" : true, "allowEmpty" : false }, //The experience of the recipe "exp" : 5.0, //Cooking time in ticks "cookingTime" : 80, "result" : { /* Result settings */ "items" : [ ], "tags" : [ ], "extensions" : [ ], "target": {} } } ``` -------------------------------- ### Targeting and Merging NBT Data Source: https://github.com/wolfyscript/customcrafting/wiki/Recipe-|-Result Configure target options to manipulate the result by merging NBT data from specific input ingredients. This allows for complex result customization based on inputs. ```json5 { "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 ] } } ``` -------------------------------- ### Add Lore by Index Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-Display-Lore This snippet demonstrates how to add a lore line from the target item to the result item using its index. Negative indices can be used to count from the end of the lore. ```json5 { key: "customcrafting:display_lore", lines: [ { index: 0 // Note: if the index is bigger/smaller than the lore size it wraps around. // Tip: negative indexes start from the end of the lore. } ] } ``` -------------------------------- ### Stonecutter Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Stonecutter-Recipes This is the basic JSON structure for a stonecutter recipe. Ensure all required fields are present and correctly formatted. The 'conditions', 'source', and 'result' fields require further definition based on your specific crafting needs. ```json { "@type" : "customcrafting:stonecutter", "group" : "", "hidden" : false, "vanillaBook" : true, "priority" : "NORMAL", "checkNBT" : true, "conditions" : { "values" : [ /* Conditions */ ] }, "source" : { /* Ingredient settings */ }, "result" : { /* Result settings */ } } ``` -------------------------------- ### Shaped Crafting Recipe JSON Structure Source: https://github.com/wolfyscript/customcrafting/wiki/Crafting-Recipes Defines the JSON structure for a shaped crafting recipe. This allows for recipes where the arrangement of ingredients in the crafting grid matters. The 'shape' field dictates the grid pattern. ```json { "@type" : "customcrafting:crafting_shaped", "group" : "", "hidden" : false, "vanillaBook" : false, "priority" : "NORMAL", "checkNBT" : true, "conditions" : { "values" : [ /* Conditions */ ] }, "result" : { /* Result settings */ }, "symmetry" : { "horizontal" : false, "vertical" : false, "rotate" : false }, //Shape that represents the 3×3 grid. //Use spaces for empty slots. Rows and Columns, that are completely empty //can be left out. "shape" : [ "123", "456", "789" ], "ingredients" : { "": { /* Ingredient settings */ } } } ``` -------------------------------- ### Register Result Extension Source: https://github.com/wolfyscript/customcrafting/wiki/3.2.1.1-Result-Extensions Register a new instance of your custom ResultExtension within the plugin's onLoad() method using CCClassRegistry.RESULT_EXTENSIONS.register(). ```java @Override public void onLoad() { getLogger().info("Registering Result Extension"); CCClassRegistry.RESULT_EXTENSIONS.register(new ExampleResultExtension()); } ``` -------------------------------- ### Copy Specific NBT Tags Source: https://github.com/wolfyscript/customcrafting/wiki/Merge-Adapter-|-NBT Selectively copy specific NBT tags like Leather armor color, Custom model data, and Attribute modifiers. This allows for precise control over which data is merged. ```hocon { key: "customcrafting:nbt/merge" query { display { color: true // Selects the Leather Armor Color } CustomModelData: true // Selects the CustomModelData AttributeModifiers: true // Selects all Attribute Modifiers } } ```