RecipeGraph
RecipeGraph is a client-side recipe scanning and exporting mod for Minecraft. It can scan all recipe data from JEI in game through commands, then export the data as a JSON graph for a specified mod scope. The exported JSON can be searched and viewed with the bundled index.html.
Features
- Export recipe graph data with in-game commands.
- Filter the export scope by mod ID.
- Limit the JEI recipe types to scan through a configuration file.
- Include node and edge count statistics in the export result.
- Use the bundled
index.html to browse, search, and analyze exported recipe graphs.
Requirements
This mod depends on a Fabric client environment and reads recipe information from the JEI runtime. Make sure that:
- Fabric Loader is installed.
- This mod and its required dependencies are installed.
- JEI is installed and enabled.
- You have entered a game world before running the export command.
Quick Start
Start the game and enter any world.
On the first run, the mod creates the following file under the config directory:
config/recipegraph-types.json
Edit recipegraph-types.json as needed to limit the recipe types to scan.
Run the export command in the in-game chat.
Find the generated .graph.json file from the export path printed in chat.
Open the bundled index.html and follow the page instructions to load the exported JSON file for searching.
Recipe Type Configuration
The mod automatically creates recipegraph-types.json on first run. This file limits the recipe types that should be scanned.
The default configuration is roughly:
{
"recipeTypes": [
"minecraft:crafting",
"minecraft:smelting",
"minecraft:blasting",
"minecraft:smoking",
"minecraft:campfire_cooking",
"minecraft:stonecutting",
"minecraft:smithing"
]
}
recipeTypes is a list of recipe type IDs. The mod reads this list and only scans recipe types included in it.
If an ID cannot be parsed as a valid Minecraft Identifier, that entry is ignored. You can use the following command to check whether the recipe types in the current configuration are available in JEI:
/recipegraph types
Example command output:
Configured RecipeGraph JEI recipe types: 7
- minecraft:crafting [available]
- minecraft:smelting [available]
- minecraft:blasting [available]
Status descriptions:
available: The recipe type exists in the current JEI runtime.
missing: The type is listed in the configuration, but JEI did not find the corresponding type at runtime.
unknown: The JEI runtime is not currently available, so the type status cannot be determined.
In-Game Commands
Export Recipes from All Mods
/recipegraph export
When no argument is specified, this is equivalent to exporting recipes from all mods.
The exported file name usually uses all as the base name, for example:
all.graph.json
Export Recipes from Specific Mods
/recipegraph export <mods>
<mods> can be one or more mod IDs. Multiple IDs can be separated by spaces or commas.
Examples:
/recipegraph export minecraft
/recipegraph export minecraft,create
/recipegraph export minecraft create farmersdelight
During export, the mod generates the file name from the specified mod IDs. Characters that are not suitable for file paths are replaced with _.
For example:
/recipegraph export minecraft create
May generate:
minecraft_create.graph.json
View Current Scan Types
/recipegraph types
This command reads or creates recipegraph-types.json, then lists the recipe types in the current configuration and shows their status in JEI.
Export Result
After running the export command, the game chat displays the export result, for example:
RecipeGraph exported: <absolute path of the exported file>
Nodes: <node count>, edges: <edge count>
Where:
Nodes is the number of exported graph nodes.
edges is the number of exported graph edges.
- The export path should be based on the actual path printed in game.
The generated file extension is:
.graph.json
Searching with index.html
The mod provides a bundled index.html page for viewing and searching exported recipe graph data.
Usage:
- Find the bundled
index.html in the config folder.
- Open the file with a browser.
- Follow the page instructions to select or load the exported
.graph.json file.
- Search recipes, items, nodes, or relationships on the page.
Command Summary
| Command |
Description |
/recipegraph export |
Export the recipe graph for all mods |
/recipegraph export <mods> |
Export the recipe graph for the specified mod IDs |
/recipegraph types |
View the currently configured recipe types and their JEI availability status |
Notes
RecipeGraph is mainly intended for recipe data analysis, recipe chain lookup, and troubleshooting item production relationships in modpacks. Export results depend on the JEI recipe data currently loaded by the client, so results may vary between different modpacks, mod lists, or configurations.
RecipeGraph
RecipeGraph 是一个用于 Minecraft 的客户端侧配方扫描与导出模组。它可以在游戏内通过命令全量扫描 JEI 中的配方数据,并按指定模组范围导出为 JSON 图数据。导出的 JSON 可以使用模组内配套的 index.html 进行检索和查看。
功能特性
- 在游戏内使用命令导出配方图数据。
- 支持按模组 ID 过滤导出范围。
- 支持通过配置文件限定要扫描的 JEI 配方类型。
- 导出结果包含节点与边数量统计。
- 配套
index.html 可用于浏览、搜索和分析导出的配方图。
使用前提
本模组依赖 Fabric 客户端环境,并通过 JEI 运行时获取配方信息。因此请确保:
- 已安装 Fabric Loader。
- 已安装本模组及其所需依赖。
- 已安装并启用 JEI。
- 已进入游戏世界后再执行导出命令。
快速开始
启动游戏并进入任意世界。
第一次运行时,模组会在配置目录下创建:
config/recipegraph-types.json
按需要编辑 recipegraph-types.json,限定需要扫描的配方类型。
在游戏聊天栏中执行导出命令。
根据聊天栏中打印的导出路径找到生成的 .graph.json 文件。
打开模组内配套的 index.html,按照页面指引加载导出的 JSON 文件进行检索。
配方类型配置
模组第一次运行时会自动创建 recipegraph-types.json。该文件用于限定需要扫描的配方类型。
默认配置大致如下:
{
"recipeTypes": [
"minecraft:crafting",
"minecraft:smelting",
"minecraft:blasting",
"minecraft:smoking",
"minecraft:campfire_cooking",
"minecraft:stonecutting",
"minecraft:smithing"
]
}
其中 recipeTypes 是一个配方类型 ID 列表。模组会读取该列表,并只扫描列表中的配方类型。
如果某个 ID 无法解析为合法的 Minecraft Identifier,该项会被忽略。可以使用以下命令查看当前配置中的配方类型是否在 JEI 中可用:
/recipegraph types
命令输出示例:
Configured RecipeGraph JEI recipe types: 7
- minecraft:crafting [available]
- minecraft:smelting [available]
- minecraft:blasting [available]
状态说明:
available:JEI 当前运行时中存在该配方类型。
missing:配置中写入了该类型,但 JEI 当前未找到对应类型。
unknown:JEI 运行时暂不可用,无法判断类型状态。
游戏内命令
导出全部模组配方
/recipegraph export
未指定参数时,等价于导出所有模组范围。
导出文件名通常会以 all 作为基础名称,例如:
all.graph.json
导出指定模组配方
/recipegraph export <mods>
<mods> 可以是一个或多个模组 ID,多个 ID 可以使用空格或逗号分隔。
示例:
/recipegraph export minecraft
/recipegraph export minecraft,create
/recipegraph export minecraft create farmersdelight
导出时,模组会根据指定的模组 ID 生成文件名。文件名中不适合作为路径字符的内容会被替换为 _。
例如:
/recipegraph export minecraft create
可能生成:
minecraft_create.graph.json
查看当前扫描类型
/recipegraph types
该命令会读取或创建 recipegraph-types.json,然后列出当前配置中的配方类型,并显示其在 JEI 中的状态。
导出结果
执行导出命令后,游戏聊天栏会显示导出结果,例如:
RecipeGraph exported: <导出文件的绝对路径>
Nodes: <节点数量>, edges: <边数量>
其中:
Nodes 表示导出的图节点数量。
edges 表示导出的图边数量。
- 导出路径以游戏内实际打印结果为准。
生成的文件扩展名为:
.graph.json
使用 index.html 检索
模组内提供了配套的 index.html 页面,用于查看和检索导出的配方图数据。
使用方式:
- 在config文件夹找到模组提供的
index.html。
- 使用浏览器打开该文件。
- 按照页面提示选择或加载导出的
.graph.json 文件。
- 在页面中进行配方、物品、节点或关联关系检索。
命令摘要
| 命令 |
说明 |
/recipegraph export |
导出全部模组范围的配方图 |
/recipegraph export <mods> |
按指定模组 ID 导出配方图 |
/recipegraph types |
查看当前配置的配方类型及 JEI 可用状态 |
备注
RecipeGraph 主要用于配方数据分析、配方链检索和模组整合包中的物品生产关系排查。导出结果依赖当前客户端已加载的 JEI 配方数据,因此不同整合包、不同模组列表或不同配置下得到的结果可能不同。