Перейти к основному содержимому

Discovery Codex Recipe Category

Defines a discovery codex recipe category

Manifest entry describing a recipe category displayed in the discovery codex.

Поля

ПолеТипПо умолчаниюОписание
categoryString—Unique identifier for this recipe category
titleString—Title displayed at the top of the recipe category inventoryПлейсхолдеры
rowsInt6Number of rows for the recipe category inventory (1-6)
orderInt0Display order when listing recipe categories
iconItem—Icon used when referencing this recipe category
iconNameString?—Optional custom name for the category icon in menus. Placeholders: {unlocked}, {total}Плейсхолдеры
iconLoreList<String>emptyOptional lore lines for the category icon. Placeholders: {unlocked}, {total}ПлейсхолдерыМногострочное
lockedIconLoreList<String>emptyLore to display for the icon when the recipe category is lockedПлейсхолдерыМногострочное
backgroundItem?—Optional background filler item for the recipe category inventory
itemSlotRangeString—Range of slots where recipe entries will be displayed (e.g. '1-25')
startSlotInt0Slot index where recipe entries start (0-based)
fillByRowBooleantrueIf true, recipe entries fill row by row; otherwise column by column
previousButtonItem?—Item used for the previous page button in the recipe category inventory
previousButtonSlotInt0Slot for the previous page button
previousButtonNameString?—Custom name for the previous page buttonПлейсхолдеры
previousButtonLoreList<String>emptyLore for the previous page buttonПлейсхолдерыМногострочное
nextButtonItem?—Item used for the next page button in the recipe category inventory
nextButtonSlotInt8Slot for the next page button
nextButtonNameString?—Custom name for the next page buttonПлейсхолдеры
nextButtonLoreList<String>emptyLore for the next page buttonПлейсхолдерыМногострочное
backButtonItem?—Item used for the back button in the recipe category inventory
backButtonSlotInt44Slot for the back button (default: 44)
backButtonNameString?—Custom name for the back buttonПлейсхолдеры
backButtonLoreList<String>emptyLore for the back buttonПлейсхолдерыМногострочное
parentCategoryString?—Optional parent category identifier
guiLayoutCodexGuiLayoutPAGINATEDGUI layout type for the recipe category menuЗначения:PAGINATEDSCROLLABLEFRAMESIMPLE
onUnlockTriggersList<Ref<TriggerableEntry>>emptyTriggers to fire when this recipe category is unlocked by a player
itemsList<RecipeItemConfig>emptyRecipes contained within this category
RecipeItemConfig (16)
ПолеТипПо умолчаниюОписание
entryIdString—Unique identifier for this recipe entry
recipeKeyString—Minecraft recipe key (NamespacedKey, e.g. 'minecraft:iron_pickaxe')
itemItem—Icon displayed when the recipe is unlocked
lockedItemItem?—Icon displayed when the recipe is locked
lockedLoreList<String>emptyLore displayed while the recipe is lockedПлейсхолдерыМногострочное
unlockedLoreList<String>emptyLore displayed when the recipe is unlockedПлейсхолдерыМногострочное
criteriaList<Criteria>emptyCriteria that unlock the recipe
menuStationSlotInt?—Optional override for the crafting station slot in the detailed recipe menu
menuStationItemItem?—Optional override of the crafting station item for this recipe
menuStationNameString?—Custom name applied to the crafting station item for this recipeПлейсхолдеры
menuStationLoreList<String>emptyLore applied to the crafting station item for this recipeПлейсхолдерыМногострочное
menuIndicatorButtonItem?—Optional indicator button displayed in the detailed recipe menu for this recipe
menuIndicatorButtonSlotsList<Int>emptySlots (0-based) where the indicator button will be placed for this recipe
menuIndicatorButtonNameString?—Custom name applied to the indicator button for this recipeПлейсхолдеры
menuIndicatorButtonLoreList<String>emptyLore applied to the indicator button for this recipeПлейсхолдерыМногострочное
onUnlockTriggersList<Ref<TriggerableEntry>>emptyTriggers to fire when this specific recipe is unlocked by a player
menuTitleString—Title of the detailed recipe menu displayed when viewing a recipeПлейсхолдеры
menuRowsInt4Number of inventory rows for the detailed recipe menu (1-6)
menuBackgroundItem?—Background filler item for the detailed recipe menu
resultSlotInt24Slot index (0-based) used to display the crafted result
craftingGridSlotsList<Int>—Slots used for the 3x3 crafting grid (must contain 9 entries)
menuBackButtonItem?—Optional back button item for the detailed recipe menu
menuBackButtonSlotInt31Slot index (0-based) for the detailed recipe back button
menuBackButtonNameString?—Custom name for the detailed recipe back buttonПлейсхолдеры
menuBackButtonLoreList<String>emptyLore applied to the detailed recipe back buttonПлейсхолдерыМногострочное
menuStationSlotInt-1Slot index (0-based) used to display the crafting station for the recipe; set to -1 to disable
menuStationItemItem?—Item shown as the crafting station. Empty = the workstation of the recipe type (crafting table, furnace, smoker, campfire, stonecutter, smithing table)
menuStationNameString?—Custom name applied to the crafting station itemПлейсхолдеры
menuStationLoreList<String>emptyLore applied to the crafting station itemПлейсхолдерыМногострочное
menuIndicatorButtonItem?—Optional indicator button displayed in the detailed recipe menu
menuIndicatorButtonSlotsList<Int>emptySlots (0-based) where the indicator button will be placed
menuIndicatorButtonNameString?—Custom name applied to the indicator buttonПлейсхолдеры
menuIndicatorButtonLoreList<String>emptyLore applied to the indicator buttonПлейсхолдерыМногострочное
Общие поля TypeWriter (criteria)
ПолеТипПо умолчаниюОписание
criteriaList<Criteria>emptyDefault criteria that unlock recipes in this category

How to use it​

Each recipe in items has an entryId and a recipeKey, the namespaced key of a recipe registered on the server (for example minecraft:iron_pickaxe). Clicking an unlocked recipe opens the detail view: the ingredients in craftingGridSlots (nine slots by default) and the result in resultSlot. Shaped, shapeless, furnace-type, stonecutting and smithing recipes are supported.

Recipe criteria fall back to the category criteria when empty. Link the category to a parent with parentCategory, or put the recipe's entryId in a normal category item to open the recipe from there.

The menuStation* and menuIndicator* fields decorate the detail view of a recipe:

  • Crafting station — menuStationSlot (-1, the default, disables it), menuStationName and menuStationLore. The item is menuStationItem; when it is empty, the workstation of the recipe type is shown (crafting table, furnace, blast furnace, smoker, campfire, stonecutter or smithing table).
  • Indicator — menuIndicatorButton placed in menuIndicatorButtonSlots, with menuIndicatorButtonName and menuIndicatorButtonLore.

Each recipe in items has the same fields, and a value set on the recipe wins over the one of the category. A station slot of -1 on a recipe disables the station decor for that recipe.