content 04
Recipes
Every .yml file in recipes/ is loaded. Each top-level key is one recipe id, which becomes the
namespaced key the recipe is registered under. Recipes are unregistered and rebuilt on reload.
Keys
| Key | Type | Default | Notes |
|---|---|---|---|
type | SHAPED, SHAPELESS or a cooking type | SHAPED | Unknown values fall back to SHAPED. |
result | id or section | the recipe id | A string, or item plus amount. |
shape | list of rows | required for shaped | Rows of single characters, space for empty. |
ingredients | map or list | required | A character map for shaped, a list for shapeless. |
source | id | required for cooking | ingredient is accepted as a second spelling. |
experience | number | 0.0 | Cooking only. |
cooking_time | ticks | 200 | Cooking only. |
group | string | empty | Recipe book group. |
permission | node | unset | Checked when the recipe is crafted. |
Referring to custom items
Prefix a Tessera id with tessera: to use a custom item. Plain names are resolved as a Tessera id
first and as a vanilla material second; minecraft: prefixes are accepted for vanilla.
Custom ingredients are matched exactly, so a vanilla emerald will not substitute for a custom item
built on EMERALD.
Example
# plugins/Tessera/recipes/ruby_recipes.yml
ruby_block_recipe:
type: SHAPED
result:
item: ruby_block
amount: 1
shape:
- "RRR"
- "RRR"
- "RRR"
ingredients:
R: tessera:ruby
ruby_sword_recipe:
type: SHAPED
result:
item: ruby_sword
amount: 1
shape:
- " R "
- " R "
- " S "
ingredients:
R: tessera:ruby
S: STICK
ruby_uncompress_recipe:
type: SHAPELESS
result:
item: ruby
amount: 9
ingredients:
- tessera:ruby_block
Shaped
shape takes up to three rows. Each character in a row has to appear in ingredients. A space means
an empty slot. Keys in ingredients must be exactly one character long, anything longer is ignored.
Shapeless
ingredients is a flat list of ids. A recipe with no resolvable ingredient is skipped.
Cooking
FURNACE, BLASTING, SMOKING and CAMPFIRE are built from source, experience and
cooking_time. Their default cooking times differ when you leave the key out: 200 ticks for furnace,
100 for blasting and smoking, 600 for campfire. STONECUTTING uses source and result only.
SMITHING takes template, base and addition, like a smithing table:
ruby_upgrade:
type: SMITHING
template: NETHERITE_UPGRADE_SMITHING_TEMPLATE
base: DIAMOND_SWORD
addition: tessera:ruby
result: ruby_sword
template and addition may be left out for an empty slot.
ruby_smelt:
type: FURNACE
source: tessera:raw_ruby
result:
item: ruby
amount: 1
experience: 0.7
cooking_time: 200
Permissions
A recipe with permission is checked when a player takes the result. Without the node the craft is
blocked. See Permissions.
Vanilla interaction
Two rules are applied to vanilla crafting:
- A vanilla recipe whose grid contains any Tessera item produces no result, so custom items cannot be consumed by accident.
- A
disabled_vanillalist at the top level of any file inrecipes/removes those vanilla recipes from the server.
disabled_vanilla:
- "minecraft:golden_apple"
Viewing
/tessera recipe <id> opens the recipe viewer for an id, and /tessera search <query> gives every
match a clickable recipe link.