change_craft
A pretty powerful action that allows you to create, modify, and delete the crafts.
Format
- 'change_craft: <recipe_id>;<action>;(semi-mandatory) <remove_namespace>;(semi-mandatory) <add_namespace>;(semi-mandatory) <craft_line_1>,<craft_line_2>,<craft_line_3>;(semi-mandatory) <result_item>;(semi-mandatory) <strict (true|false)>;(semi-mandatory) <ingredient_items>'
<recipe_id> – the recipe/craft to change, the existing minecraft recipes are the item names (for example: stone_sword) or it can be in another view in case of custom crafts; (MANDATORY)
<action> – may be ADD, REMOVE or CHANGE; (MANDATORY)
<remove_namespace> – is needed in order to get a specific place where the craft needs to be removed from, for example, if craft has the same name in different plugins (specify "null" if you want to remove the recipe with default "TriggerReactor" plugin namespace), it can be "Minecraft" (built-in minecraft crafts), "All" (any suitable crafts in any namespaces), "CustomCrafting" (intended name of the plugin), “my_test_namespace” and any other plugins or your own made-up namespaces (this namespace should be used only with "REMOVE" or "CHANGE" actions, with "ADD" this value will be skipped, then you can leave it "null"); (SEMI-MANDATORY)
<add_namespace> – is needed in order to get a specific place where the craft needs to be added, for example, if the craft has the same name in different plugins (specify "null" if you want to add new recipe with default "TriggerReactor" plugin namespace), it can be "Minecraft" (built-in minecraft crafts), "CustomCrafting" (intended name of the plugin), "my_test_namespace" and any other plugins or your own made-up namespaces (this namespace should be used only with "ADD" or "CHANGE" actions, with "REMOVE" this value will be skipped, then you can leave it "null"); (SEMI-MANDATORY)
<craft_line_1>,<craft_line_2>,<craft_line_3> – the craft "letters substitutes", is the same as craft lines in the workbench, i.e. “craft_line_1” is the first line and so on (for example: "AAA, BAB, ABA", for empty elements use spaces) (should be used only with "ADD" or "CHANGE" actions); (SEMI-MANDATORY)
<result_item> – the item in the craft result, it supports some meta in format amount:name:lore:enchantments:custom_model_data (unnecessary options can be skipped, for example: "DIAMOND_SWORD:1:§cMega Sword::SHARPNESS=1") (should be used only with "ADD" or "CHANGE" actions); (SEMI-MANDATORY)
<strict> – whether the ingredients in the crafting process must match the specified ingredients in all respects (such as lore, name etc), or whether only the material is sufficient (should be used only with "ADD" or "CHANGE" actions); (SEMI-MANDATORY)
<ingredient_items> – the ingredients items, support some meta in format amount:name:lore:enchantments:custom_model_data as well (unnecessary options can be skipped), the correct general format: "<letter substitute>,<material>:<properties>" (for example: A,STICK:2:§cSuper-stick;B,DIAMOND:::::14) (should be used only with "ADD" or "CHANGE" actions). (SEMI-MANDATORY)
Amount has no effect on ingredients.
Be careful, as the names of enchantments are different on different versions!
Any namespace must contain either “Minecraft”, the name of some plugin, or your custom made-up name in the format [a-z0-9._-] (only small letters, numbers, dots, underscores and dashes), <remove_namespace> can also contain “All” (as it is written above in the options explanation).
The "lore" meta supports miltuply lore lines with "|" symbol.
Where is useful
For example, if you want to make able to craft your custom items, or, vice versa, remove some existing items from the crafting possibility.
Examples
- 'change_craft: custom_sword;ADD;null;custom_crafts; D , D , S ;DIAMOND_SWORD:2:§cSword "double profit!":DAMAGE_ALL=5;true;D,DIAMOND;S,STICK:::|§cSuper-stick' # Add a new craft with id "custom_sword" in "custom_crafts" custom namespace with the final item of a diamond sword named "§cSword "double profit!"", the ingredients of diamonds and a stick with lore "§cSuper-stick" on the second line, the arrangement of ingredients like a default diamond sword and strict matching of ingredients so that not only the material but also the lore etc are taken into account
- 'change_craft: custom_sword;REMOVE;All' # Remove all crafts with "custom_sword" id in any namespaces or plugins
Last updated