Minecraft-Recipe-Tools/README.md
CPTProgrammer efff4b4143 Update README.md
Fixed the wrong bash command
2024-12-31 03:15:55 +08:00

44 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Minecraft Recipe Tools
使用前请先运行,以安装必要库
```bash
npm install
```
### 文件夹说明
- `./data` 导出的合成配方
- `./mods` 放置待导出合成配方的模组
- `./recipes` 生成的数据包
### 文件作用
- `extract_recipes.js`:把 `./mods` 下所有模组的合成配方导出至 `./data` 文件夹下
- `generate.js`:根据 `settings.json` 配置,找出 `./data` 下需要修改的配方,并于 `./recipes` 生成数据包
### 配置文件
- `enableSearch: boolean` 启用搜索
- `enableGenerate: boolean` 启用生成数据包
- `same: Array<ItemMapping>` 物品映射列表
```typescript
type ItemMapping = {
tag: string; // Minecraft 标签
replace: boolean; // 是否覆盖原标签(同 Minecraft Tag JSON 文件)
list: Array<string>; // 应被视为相同物品的物品 ID 列表
}
- `search: SearchArgument` 搜索参数
```typescript
type SearchArgument = {
tags: Array<string>; // 要搜索的标签(不搜索合成结果)
items: Array<string>; // 要搜索的物品ID不搜索合成结果
}
```