Custom Recipes - TheComputerGeek2/MagicSpells GitHub Wiki
Custom recipes can be defined in the general.yml
file or any spell file. The main configuration looks like this:
recipes:
randomKey:
# (Recipe configuration section)
# type:
# . . .
Option | Description |
---|---|
type |
See Recipe types below. |
group |
A string. This can be used to group recipes in the Recipe Book. For example, all dye recipes are grouped. |
result |
Magic Item String or Magic Item Config |
quantity |
Quantity of the result. |
namespace-key |
This namespaced key makes the recipe unique from all other recipes. You can only specify the key as the namespace is always magicspells . |
Option | Description |
---|---|
category |
Since 4.0 Beta 14. Category |
shape |
Recipe shape is a string list. It should have 3 string elements, every 3 characters long. It's representing a 3x3 shape. Take a look below for an example. |
ingredients |
Map of the ingredients. Key-value pair, where the key is a shape character, and the value is a Recipe Choice. Unmapped characters usually represent air. |
Example:
shape:
- "I#I"
- "III"
- "III"
ingredients:
I: iron_ingot
Option | Description |
---|---|
category |
Since 4.0 Beta 14. Category |
ingredients |
Map of the ingredients. Key-value pair, where the key is ignored, and the value is a Recipe Choice. |
Example:
type: shapeless
result: written_book
ingredients:
1: book
2: inc_sac
three: feather
Option | Description |
---|---|
ingredient |
Recipe Choice |
Option | Description |
---|---|
base |
Recipe Choice |
template |
Since 4.0 Beta 13, and MC 1.20. Recipe Choice |
addition |
Recipe Choice |
copyNbt |
Since 4.0 Beta 13. true by default. Defines whether to copy the NBT from the base item to the result . |
Cooking recipes.
Option | Description |
---|---|
category |
Since 4.0 Beta 14. Category |
ingredient |
Recipe Choice |
experience |
Number (double) of experience points to reward. |
cooking-time |
Server ticks duration. |
Warning
Before 4.0 Beta 13, a "Recipe Choice" could only be a material name.
ingredient: stick
Everything below this alert is only valid since 4.0 Beta 13.
Recipe Choice defines what items are allowed as ingredients for a recipe in a specific slot. It may either be Material Tags or specific Items.
You can find material tag names here.
ingredient: "tag:armor"
Example of a slot that accepts any armor piece. This is the same as the singular armor
material tag.
ingredient:
- "tag:helmets"
- "tag:chestplates"
- "tag:leggings"
- "tag:boots"
Accepts Magic Item String and Magic Item Config.
Example:
# May be in config format:
ingredient:
type: stick
name: "<gold>Magic Twig"
# Or string format:
ingredient: 'stick{name: "<gold>Magic Twig"}'
An example of an ingredient may be a stick named "Magic Twig", colored gold or red.
type: stonecutter
#
ingredient:
# Compact config format:
- {type: stick, name: "<gold>Magic Twig"}
# String format:
- 'stick{name: "<red>Magic Twig"}'
- ...