Advanced Recipes

If you haven't read the Basic Recipes I suggest you do before reading this tutorial.

This page will cover more advanced customization of recipes.

You should first know about argument styles that I'm going to be using in this tutorial. Arguments enclosed between < and > are required and those enclosed between [ and ] are optional. Some arguments may have 'or false', that means you can just type false in there to make it do something special (most likely disable the flag or a feature)

Recipe Books and Named Recipes

You can name recipes by just writing something after the type definition, e.g.:

<recipe definition> [recipe name]

That name can be used in recipe books.

To learn more about recipe books, see the Recipe Books page.

Using Flags

Here's the full syntax of a recipe file:

[@ shared or recipe flag]
[... more flags]

<recipe definition> [recipe name]
[@ shared or recipe flag]
[... more flags]
<ingredients>
[@ ingredient flags]
= <result>
  [@ shared or result flag]
  [... more flags]
[... more results]

[... more recipes]
Here's a quick example of the above syntax by using all available options:
Pattern Format
Simple Format
@message You crafted this! // this applies to all recipes within this file

COMBINE
@broadcast {player} has crafted a fine sword!
pattern abcc
a iron_ingot
b gold_ingot
c diamond
= golden_sword
  @enchant durability max
  @name Fine Gold Sword
  @lore <gray>This sword has been crafted from pure awesomeness!
@message You crafted this! // this applies to all recipes within this file

COMBINE
@broadcast {player} has crafted a fine sword!
iron_ingot + gold_ingot + diamond:0:2
= golden_sword
  @enchant durability max
  @name Fine Gold Sword
  @lore <gray>This sword has been crafted from pure awesomeness!
Iron Ingot
Gold Ingot
Diamond
Diamond
Shapeless Workbench
Fine Gold Sword
Unbreaking III
This sword has been crafted from pure awesomeness!
CRAFT Some Awesome Recipe
@modexp +1
@message false // disable the file-wide flag on this recipe
apple
= apple
Apple
Shaped Workbench
Apple

Advanced Recipe Examples

Same Ingredients, Different Names, Different results

Pattern Format
Simple Format
combine
@individualresults
pattern aaa
a gold_nugget
= iron_ingot
  @ingredientcondition gold_nugget | name Silver Nugget
= diamond
  @ingredientcondition gold_nugget | name Diamond Nugget
combine
@individualresults
gold_nugget:0:3
= iron_ingot
  @ingredientcondition gold_nugget | name Silver Nugget
= diamond
  @ingredientcondition gold_nugget | name Diamond Nugget

This recipe lets you combine 3 gold nuggets named differently to create different results. If you combine 3 unnamed ones nothing will result, but if they're named "Silver Nugget" you'll get an iron_ingot. And if they're named "Diamond Nugget" you'll get a diamond, try it out!

Silver Nugget
Silver Nugget
Silver Nugget
Shapeless Workbench
Iron Ingot
Diamond Nugget
Diamond Nugget
Diamond Nugget
Shapeless Workbench
Diamond

Explosive Fuel

fuel
@forchance 25% @explode fire
sulphur % 30

When sulphur burns it has 25% chance of exploding and causing fires.

Gunpowder
30s