Recipe Book - WolfyScript/CustomCrafting-Wiki GitHub Wiki

The Recipe Book allows your players to view the recipes you created and how they can be used.

Your players have multiple ways to open the Recipe Book.
Either via the /recipes command or via the Recipe Book Item, which you can get via /cc give <player> customcrafting:recipe_book.
The /recipes command also requires the customcrafting.cmd.recipes.

They will only be able to view the recipes they have permission to use.

Configure Categories

In the latest versions of CustomCrafting there is the possibility to create your own categories for the Recipe Book. The GUI allows you to create basic categories but doesn't include all features.

For a more detailed configuration, you need to edit the recipe_book.json.

You can edit the recipe_book.json any time and update it in-game using /cc reload.

There are two sections available in the recipe_book.json.
The categories section contains all the categories that are displayed on the main menu of the Recipe Book. If only one is available it will skip the main menu and will open the category directly.
The filters section is for the filters, that are displayed on the bottom middle of each category, and filter the recipes of a category.

Each section has a sort list that allows you to specify the order of the category/filter.

Categories

Categories can have specific settings, as an example, we will use CustomCrafting category.

{
      "id" : "customcrafting",
      "icon" : "CRAFTING_TABLE",
      "name" : "$recipe_book.category.customcrafting.name$",
      "description" : [ "&7Contains CustomCrafting`s special recipes" ],
      "auto" : false,
      "groups" : [ ],
      "namespaces" : [ "customcrafting" ],
      "recipes" : [ ]
}

id: The id of the Category. Must be unique!
icon: A material of the icon. List of all Materials
name: The name of the category. Can contain language keys.
description: The description (lore) of the category.
auto: Automatically include all available groups and namespaces. If enabled ignores namespaces, recipes, and groups
groups: All the recipe groups included in this category.
namespaces: All namespaces included in this category.
recipes: All recipes included in this category.

Filters

Filters have similarities to Categories but also have their own settings. As an example the search (Compass) filter:

{
      "id" : "search",
      "icon" : "COMPASS",
      "name" : "$recipe_book.filter.search.name$",
      "description" : [ "$recipe_book.filter_navigation$" ],
      "groups" : [ ],
      "namespaces" : [ ],
      "recipes" : [ ],
      "creativeModeTabs" : [ "SEARCH" ],
      "materials" : [ ]
}

id: The id of the Category. Must be unique!
icon: A material of the icon. List of all Materials
name: The name of the category. Can contain language keys.
description: The description (lore) of the category.
groups: The recipe groups that are allowed through the filter.
namespaces: The namespaces that are allowed through the filter.
recipes: The recipes that are allowed through the filter.
creativeModeTabs: The Materials of the Creative inventory menus. Like SEARCH, BREWING, TOOLS, etc.
materials: The materials of items allowed. List of all Materials

The materials (including creativeModeTabs) will be checked last, so any recipe added won't be allowed if it doesn't contain at least one of the material in it's result!

CustomCrafting v1.6.5.x

Before you edit it, make sure the server is stopped or that you edit a copy of the recipe_book.json, that you replace the original file with once you stopped the server.

Each Category consists of:

  • a unique id
  • an icon (Material)
  • a name.
  • a description (Optional)
  • a list of recipes, that contains all the NamespacedKeys of the recipes. Recipes with similar results will get merged into one entry.
  • itemCategories contains the item materials that are allowed depending on the creative categories.
  • materials contains the specific item materials that are allowed in that category.

These categories are added into specific sections. There are two category sections, main and switch.

  • main contains the categories that are displayed in the main menu of the Recipe Book. If only one category is available it will skip the main menu and directly display the category.
  • switch contains the categories that are present in every main category as a toggle button on the top middle. Clicking that button switches between these categories.

It is recommended to have a look at the original recipe_book.json to see how the default categories are set up.

⚠️ **GitHub.com Fallback** ⚠️