ChatOrder
ChatOrder is an add-on for Order To Cook that converts Minecraft chat messages into in-game customer interactions.
It can create orders, select dine-in or takeaway service, change viewer customer skins, and ring the order bell according to message content.
Important: ChatOrder does not connect to livestream platforms or retrieve livestream messages by itself. A separate danmaku or chat mod is required to receive messages from platforms such as Douyin or Bilibili.
ChatOrder currently recognizes Chinese interaction keywords only. The documentation is available in English, but English order phrases are not supported.
Features
- Convert chat or danmaku messages into Order To Cook orders.
- Select a specific meal set by number or letter.
- Generate a random order from the currently available menu.
- Choose dine-in or takeaway service.
- Allow viewers to select customer skins.
- Let viewers ring the order bell through chat keywords.
- Receive messages through four different integration methods.
- Support DyDanmaku and BakaDanmaku message formats by default.
- Adapt to other chat or danmaku mods through configurable regular expressions.
- Prevent duplicate orders when the same message is captured through multiple sources.
- Provide a public API for direct integration with other mods.
- Provide detailed development logs for parsing and server-side processing.
Supported Versions
| Minecraft | Mod Loader | Requirement |
|---|---|---|
| 1.20.1 | Forge 47.4.x | Order To Cook 1.3.5 or later |
| 1.21.1 | NeoForge 21.1.x | Order To Cook 1.3.5 or later |
ChatOrder is currently adapted to the internal implementation of Order To Cook 1.3.5.
A future Order To Cook update may temporarily break compatibility if its internal implementation changes.
Installation
- Install the correct version of ChatOrder for your Minecraft version.
- Install Order To Cook 1.3.5 or later and its required dependencies.
- Launch the game once.
- ChatOrder will generate the following configuration file:
config/chatorder/chatorder.json5
Singleplayer and LAN Worlds
Run the following command to enable local message parsing:
/chatorder enable
To disable local message parsing:
/chatorder disable
Dedicated Servers
On a dedicated server, edit the server-side configuration file and set:
"enabled": true
Restart the server after changing the configuration.
Client commands only modify the local client configuration. They cannot directly enable ChatOrder on a dedicated server.
How Messages Enter ChatOrder
ChatOrder supports four message input methods.
1. Public API
Other mods can submit raw chat or danmaku messages directly through the ChatOrder public API.
This is the recommended method for mods that actively integrate with ChatOrder.
ChatOrder remains responsible for parsing interactions and communicating with Order To Cook, while the external mod remains responsible for connecting to the livestream platform.
2. Mod Loader Chat Capture
ChatOrder can capture public chat messages through supported Mod Loader chat hooks.
This allows it to process messages displayed in the Minecraft chat interface by other mods without modifying those mods.
3. Native Minecraft Chat Events
ChatOrder can process messages received through native Minecraft chat events, including:
- Regular player chat
- Received private messages
- Messages displayed in the Minecraft chat window
4. ChatOrder Commands
ChatOrder provides a command that simulates an incoming message and tests the complete parsing and order-submission process.
Example:
/chatorder danmaku [消息] 测试观众:我来下单了 套餐A 外卖
This command follows the same parsing and submission flow used for captured messages.
Language Support
ChatOrder currently recognizes Chinese interaction keywords only.
Every interaction message must contain:
我来下单了
Messages without this phrase will not enter the interaction parser.
English text may still appear in viewer names or skin file names, but order actions must use the supported Chinese keywords.
Order Examples
Select a Meal Set by Number
我来下单了 套餐1
我来下单了 套餐2
套餐1, 套餐2, and similar keywords select a meal set by its numeric position.
Select a Meal Set by Letter
我来下单了 套餐A
我来下单了 套餐B
套餐A, 套餐B, and similar keywords select a meal set by letter.
Create a Random Order
我来下单了 随机订单
ChatOrder randomly selects one of the currently available meal sets.
Dine-In and Takeaway
Dine-In
我来下单了 套餐A 堂食
The keyword 堂食 forces the order to use dine-in service.
Takeaway
The following keywords request takeaway:
我来下单了 套餐A 外带
我来下单了 套餐A 外卖
我来下单了 套餐A 带走
我来下单了 套餐A 打包
Supported takeaway keywords include:
外带外卖带走打包
If a message contains both dine-in and takeaway keywords, 堂食 takes priority.
If the viewer does not specify either type, Order To Cook decides randomly.
Supported Message Examples
ChatOrder includes default parsing rules for common DyDanmaku and BakaDanmaku formats.
Examples:
[消息] 测试观众:我来下单了 套餐A 外卖
[舰] <测试观众> 我来下单了 随机订单 堂食
我来下单了-测试观众-套餐B
[消息] 测试观众:我来下单了 换皮肤:熊猫
[消息] 测试观众:我来下单了 快点做
Fallback Message Format
ChatOrder supports the following fallback format:
我来下单了-用户名-内容
Example:
我来下单了-测试观众-套餐B
The viewer name may also be omitted:
我来下单了-套餐B
When the remaining content can be parsed as a valid interaction, ChatOrder assigns a random customer name.
Viewer Skins
Viewers can select local Minecraft skin files for their Order To Cook customers.
Place 64×64 PNG skin files in:
config/chatorder/skins
The file name becomes the skin name used in chat.
For example, create:
熊猫.png
Then send:
我来下单了 换皮肤:熊猫
A slim-arm skin can use a file name such as:
cat_slim.png
Then send:
我来下单了 换皮肤:cat_slim
A skin change only succeeds when the requested name matches an available local skin file or built-in skin preset.
If a custom skin file has the same name as a built-in preset, the custom file takes priority.
In multiplayer, other players must also have a skin file with the same name to see the same appearance.
ChatOrder remembers the following information for the 20 most recently active viewers:
- Viewer name
- Selected skin
- Last interaction time
This allows returning viewers to keep their previously selected customer skin.
Built-In Skins
ChatOrder currently includes the following built-in skin presets:
| English Description | Chat Keyword |
|---|---|
| Bat | 蝙蝠 |
| Fox | 狐狸 |
| Chicken | 鸡哥 |
| Skeleton | 骷髅 |
| Pumpkin | 南瓜 |
| Penguin | 企鹅 |
| Enderman | 小黑 |
| Panda | 熊猫 |
| Spider | 蜘蛛 |
Example:
我来下单了 换皮肤:企鹅
Ringing the Order Bell
Viewers can trigger the Order To Cook order bell through supported Chinese keywords.
Examples:
我来下单了 催单
我来下单了 快点做
我来下单了 按铃
我来下单了 敲铃
我来下单了 响铃
Supported bell keywords include:
催单快点做按铃敲铃响铃
Custom Chat and Danmaku Formats
ChatOrder includes default rules for DyDanmaku and BakaDanmaku.
To support another chat or danmaku format, edit:
config/chatorder/chatorder.json5
Configure the chatRegexPatterns field:
"chatRegexPatterns": [
"^\\[消息\\]\\s*(?<name>[^::\\r\\n]+?)\\s*[::]\\s*(?<content>.+)$",
"^我来下单了-(?:(?<name>[^-\\r\\n]+?)-)?(?<content>.+)$"
]
Each rule should use the following named groups:
(?<name>...)extracts the viewer name.(?<content>...)extracts the message content.
Rules are checked from top to bottom.
Because the rules are stored in JSON, backslashes must be escaped as \\.
Restart the game after changing the configuration. ChatOrder does not reload these rules while the game is running.
Duplicate Message Protection
The same message may sometimes enter ChatOrder through more than one source.
For example, a message could be captured through both a Mod Loader hook and a Minecraft chat event.
ChatOrder generates a short-lived fingerprint for each received message and ignores repeated copies, preventing one viewer message from creating multiple orders.
Development Mode
Development mode records detailed information about:
- Message source
- Original message text
- Regular-expression matching
- Parsing result
- Structured client request
- Server-side processing result
Enable development mode:
/chatorder dev true
Disable development mode:
/chatorder dev false
It can also be enabled in the configuration file:
"devMode": true
ChatOrder development mode is independent of the development mode provided by Order To Cook.
Debug information is written to the game log and is not displayed in the Minecraft chat window.
Multiplayer Notes
Singleplayer
Install ChatOrder and Order To Cook normally.
LAN and Dedicated Servers
The following sides require the mods:
- The server that validates and creates orders must have ChatOrder and Order To Cook installed.
- The client that captures and submits messages must also have ChatOrder and Order To Cook installed.
Client commands only change the local client configuration.
On a dedicated server, ChatOrder must be enabled through the server-side configuration file.
For Mod Developers
Other mods can submit raw messages through the ChatOrder public API instead of relying on chat-window capture.
This keeps responsibilities separated:
- The external mod connects to a livestream or chat platform.
- ChatOrder parses supported Chinese interaction messages.
- Order To Cook creates and processes the in-game restaurant interaction.
Development, public API, loader porting, and integration information is available in the project repository's DEV.md.
Links
- Source code: GitHub
- Parent mod: Order To Cook
中文说明
ChatOrder 是 Order To Cook(下单了) 的附属模组,用于将 Minecraft 聊天消息转换为游戏内的顾客互动。
它可以根据消息内容创建订单、选择堂食或外带、更换观众顾客皮肤,以及触发订单铃声。
**注意:**ChatOrder 本身不负责连接直播平台,也不会主动获取直播间弹幕。 你仍然需要使用其他弹幕或聊天模组,从抖音、哔哩哔哩等平台获取消息。
ChatOrder 当前仅支持使用中文关键词触发互动,不支持英文点单语句。
主要功能
- 将聊天或弹幕消息转换为 Order To Cook 订单。
- 按数字或字母选择指定套餐。
- 从当前可用菜单中随机生成订单。
- 指定堂食或外带。
- 允许观众选择顾客皮肤。
- 通过聊天关键词触发订单铃声。
- 支持四种消息接入方式。
- 默认适配 DyDanmaku 和 BakaDanmaku 的消息格式。
- 通过可配置正则表达式适配其他聊天或弹幕模组。
- 对多个入口重复捕获的消息进行去重。
- 提供公开 API,供其他模组主动接入。
- 提供消息解析及服务端处理调试日志。
支持版本
| Minecraft | Mod Loader | 额外要求 |
|---|---|---|
| 1.20.1 | Forge 47.4.x | Order To Cook 1.3.5 或更高版本 |
| 1.21.1 | NeoForge 21.1.x | Order To Cook 1.3.5 或更高版本 |
当前版本按照 Order To Cook 1.3.5 的内部实现进行适配。
如果未来 Order To Cook 修改内部代码,ChatOrder 可能会暂时出现兼容问题。
安装与启用
- 安装与 Minecraft 版本对应的 ChatOrder。
- 安装 Order To Cook 1.3.5 或更高版本及其前置模组。
- 启动一次游戏。
- ChatOrder 会生成配置文件:
config/chatorder/chatorder.json5
单人游戏和局域网房主
启用本机消息解析:
/chatorder enable
关闭本机消息解析:
/chatorder disable
独立服务器
独立服务器需要由管理员编辑服务端配置文件,将:
"enabled": true
修改配置后重启服务器。
客户端命令只能修改客户端本机配置,不能直接启用独立服务器上的 ChatOrder。
消息接入方式
ChatOrder 支持四种消息接入方式。
1. 公开 API
其他模组可以通过 ChatOrder 的公开 API 直接提交原始聊天或弹幕消息。
对于愿意主动适配 ChatOrder 的模组,这是推荐的接入方式。
其他模组负责连接直播平台,ChatOrder 负责解析互动并与 Order To Cook 通信。
2. Mod Loader 聊天捕获
ChatOrder 可以通过 Mod Loader 提供的聊天钩子捕获公开聊天消息。
只要其他弹幕模组会将弹幕显示在 Minecraft 聊天界面中,ChatOrder 就有机会在不修改对方源码的情况下读取并解析消息。
3. Minecraft 原生聊天事件
ChatOrder 可以处理通过 Minecraft 原生聊天事件接收到的消息,包括:
- 普通玩家聊天消息
- 收到的私聊消息
- 显示在 Minecraft 聊天窗口中的消息
4. ChatOrder 命令
ChatOrder 提供测试命令,可以模拟收到一条弹幕,并验证完整的解析和订单提交流程。
示例:
/chatorder danmaku [消息] 测试观众:我来下单了 套餐A 外卖
该命令使用与真实聊天消息相同的解析和提交流程。
点单关键词
所有互动消息都必须包含:
我来下单了
不包含该短语的消息不会进入后续互动解析。
按数字选择套餐
我来下单了 套餐1
我来下单了 套餐2
按字母选择套餐
我来下单了 套餐A
我来下单了 套餐B
随机订单
我来下单了 随机订单
ChatOrder 会从当前可用套餐中随机选择一个。
堂食与外带
堂食
我来下单了 套餐A 堂食
关键词 堂食 会强制生成堂食订单。
外带
我来下单了 套餐A 外带
我来下单了 套餐A 外卖
我来下单了 套餐A 带走
我来下单了 套餐A 打包
支持的外带关键词包括:
外带外卖带走打包
如果消息中同时存在堂食和外带关键词,以 堂食 为准。
如果消息中没有指定堂食或外带,则由 Order To Cook 随机决定。
支持的消息示例
ChatOrder 默认包含 DyDanmaku 和 BakaDanmaku 常见消息格式的解析规则。
[消息] 测试观众:我来下单了 套餐A 外卖
[舰] <测试观众> 我来下单了 随机订单 堂食
我来下单了-测试观众-套餐B
[消息] 测试观众:我来下单了 换皮肤:熊猫
[消息] 测试观众:我来下单了 快点做
兜底消息格式
ChatOrder 支持以下兜底格式:
我来下单了-用户名-内容
示例:
我来下单了-测试观众-套餐B
用户名也可以省略:
我来下单了-套餐B
当剩余内容可以解析为有效互动时,ChatOrder 会分配一个随机顾客名。
观众皮肤
观众可以为 Order To Cook 中的顾客选择本地 Minecraft 皮肤。
将 64×64 PNG 文件放入:
config/chatorder/skins
文件名就是聊天消息中使用的皮肤名。
例如,放入:
熊猫.png
然后发送:
我来下单了 换皮肤:熊猫
细手臂模型可以使用类似以下文件名:
cat_slim.png
然后发送:
我来下单了 换皮肤:cat_slim
只有当请求的名称与本地皮肤文件或内置皮肤预设匹配时,换肤才会生效。
如果玩家皮肤文件与内置预设同名,优先使用玩家提供的文件。
联机时,其他玩家也需要安装同名皮肤文件,才能看到相同的顾客外观。
ChatOrder 会保存最近 20 名活跃观众的以下信息:
- 观众名称
- 所选皮肤
- 最后操作时间
观众后续再次点单时,可以继续使用之前选择的皮肤。
内置皮肤
ChatOrder 当前包含以下内置皮肤:
蝙蝠狐狸鸡哥骷髅南瓜企鹅小黑熊猫蜘蛛
示例:
我来下单了 换皮肤:企鹅
催单和订单铃声
观众可以通过以下消息触发 Order To Cook 的订单铃声:
我来下单了 催单
我来下单了 快点做
我来下单了 按铃
我来下单了 敲铃
我来下单了 响铃
支持的关键词包括:
催单快点做按铃敲铃响铃
适配其他聊天或弹幕格式
ChatOrder 默认提供 DyDanmaku 和 BakaDanmaku 的解析规则。
需要适配其他格式时,编辑:
config/chatorder/chatorder.json5
修改 chatRegexPatterns:
"chatRegexPatterns": [
"^\\[消息\\]\\s*(?<name>[^::\\r\\n]+?)\\s*[::]\\s*(?<content>.+)$",
"^我来下单了-(?:(?<name>[^-\\r\\n]+?)-)?(?<content>.+)$"
]
每条正则表达式应包含以下命名组:
(?<name>...):提取观众名称。(?<content>...):提取消息正文。
规则会按照配置顺序从上到下依次匹配。
由于配置使用 JSON 格式,反斜杠需要写成 \\。
修改配置后需要重启游戏,ChatOrder 不会在游戏运行期间重新加载这些规则。
消息去重
同一条消息有时可能会通过多个入口进入 ChatOrder。
例如,一条消息可能同时被 Mod Loader 聊天钩子和 Minecraft 聊天事件捕获。
ChatOrder 会为消息生成短时间有效的指纹,并忽略重复副本,防止同一条消息创建多个订单。
调试模式
调试模式会记录以下信息:
- 消息来源
- 原始消息文本
- 正则表达式匹配结果
- 互动解析结果
- 客户端结构化请求
- 服务端处理结果
启用调试模式:
/chatorder dev true
关闭调试模式:
/chatorder dev false
也可以在配置文件中设置:
"devMode": true
ChatOrder 的调试模式与 Order To Cook 的开发模式相互独立。
调试信息只会写入游戏日志,不会显示在 Minecraft 聊天窗口中。
多人游戏说明
单人游戏
正常安装 ChatOrder 和 Order To Cook 即可。
局域网和独立服务器
以下位置需要安装相关模组:
- 负责校验并创建订单的服务端需要安装 ChatOrder 和 Order To Cook。
- 负责捕获和提交消息的客户端也需要安装 ChatOrder 和 Order To Cook。
客户端命令只能修改客户端本机配置。
独立服务器必须通过服务端配置文件启用 ChatOrder。
面向模组开发者
其他模组可以通过 ChatOrder 的公开 API 提交原始消息,而不依赖聊天窗口捕获。
各模组职责可以保持独立:
- 外部弹幕模组负责连接直播或聊天平台。
- ChatOrder 负责解析中文互动消息。
- Order To Cook 负责创建和处理游戏内餐厅互动。
开发说明、公开 API、加载器移植及其他平台适配信息请参阅项目仓库中的 DEV.md。
链接
- 源代码:GitHub
- 前置模组:Order To Cook

