... | ... | @@ -60,43 +60,6 @@ recipes: |
|
|
hide-when-locked: true
|
|
|
```
|
|
|
|
|
|
## Setting up recipe ingredients
|
|
|
The most important part about crafting recipes is the recipe ingredients (physical items any player must have to use the recipe). Recipe ingredients are stored in a list inside the recipe config section. There are multiple types of recipe ingredients, the default ones being:
|
|
|
* items generated using MMOItems
|
|
|
* vanilla items (not generated using MI) with a custom display name
|
|
|
|
|
|
For instance, the ingredients needed to craft a silver sword are the following: 4 steel ingots (item generated using MMOItems) and 2 vanilla wooden sticks.
|
|
|
```
|
|
|
recipes:
|
|
|
steel-sword:
|
|
|
ingredients:
|
|
|
- 'mmoitem MATERIAL STEEL_INGOT 4 Steel_Ingot'
|
|
|
- 'vanilla STICK . 2 Wooden_Stick'
|
|
|
```
|
|
|
|
|
|
In order to setup an MMOItem ingredient, use `mmoitem <ITEM_TYPE> <ITEM_ID> (amount) (GUI_name)`. The `GUI_name` option corresponds to the name which will be displayed in the ingredient list, in the recipe item lore. Arguments marked with () brackets are optional.
|
|
|
In order to setup a vanilla ingredient, use `vanilla <ITEM_TYPE> (display_name) (amount) (GUI_name)`. Set the vanilla item `display_name` to . to have no display name.
|
|
|
|
|
|
The ingredient list presented previously should look like this in game:\
|
|
|
![](https://i.imgur.com/jECX7PW.png)
|
|
|
|
|
|
## Setting up recipe conditions
|
|
|
Just like ingredients, conditions must be met in order to use a recipe. Unlike ingredients, conditions do not take anything from the player inventory when using a crafting recipe. There are several types of recipes conditions, the main being **level** conditions and **permission** conditions. Just like ingredients, conditions are stored in a list inside the recipe config section.
|
|
|
```
|
|
|
recipes:
|
|
|
steel-sword:
|
|
|
conditions:
|
|
|
- 'level 5'
|
|
|
- 'perms mmoitems.recipe.steel-sword mmoitems.recipe.station.steel'
|
|
|
```
|
|
|
|
|
|
If you want your recipe to be available only for players who are at least **level** X, use this: `level <required_level>`. If you want your recipe to be available only for players with specific **permissions**, use: `perms <perm1> <perm2> <perm3> ...`. Perm nodes must be separated using spaces.
|
|
|
|
|
|
You may also make the crafting recipe consume mana/stamina/food when used by a player. In order to setup a mana/food/stamina recipe condition, use (e.g mana) `mana <amount>`.
|
|
|
|
|
|
The `hide-when-locked` recipe option only triggers when at least one of the conditions is/are not met. The recipe will still display in the GUI if the player does not have all the required ingredients. Recipe conditions display at the beginning of the GUI recipe item lore.\
|
|
|
![](https://i.imgur.com/xPwlm5B.png)
|
|
|
|
|
|
## Crafting station example
|
|
|
```
|
|
|
name: 'Steel Crafting Station (#page#/#max#)'
|
... | ... | |