⚠️ 实验性模组
SecondBrain

一款 Fabric 模组,为你的 Minecraft 世界带来智能 NPC。创建由大语言模型(LLM)控制的类玩家角色,它们能回应你的聊天消息并执行基本的玩家操作。
此模组完全在服务器端运行。必须在客户端也安装才能进行设置。
依赖要求
- Minecraft 版本: 1.20.1/1.21.1
- 正在运行的 Ollama 服务器 或 Player2 App 或 OpenAi API Key
模组安装
- 下载模组:
- 从 Modrinth 页面获取
SecondBrain模组的最新版本。
- 从 Modrinth 页面获取
- 安装模组:
- 将
secondbrain.jar放入你的 Minecraft Fabric 服务器和客户端的mods文件夹中。
- 将
- 启动 Minecraft:
- 启动 Minecraft 客户端和服务器,即可开始使用!
与 Ollama/OpenAi 配合使用
注意:玩家必须是操作员(operator)才能执行以下命令
GUI(图形界面)
- 输入
/secondbrain命令打开 GUI,并在其中创建/生成、消失/删除或编辑 NPC。 - 也可以在此处编辑基础配置。
命令(已弃用)
警告:此命令使用默认的 ollama/openai 设置!
生成 NPC:使用/secondbrain add <npcname> <openai|ollama>命令来创建 NPC。(目前仅支持 ollama)(示例:/secondbrain add sailex428 OLLAMA)
移除 NPC:使用/secondbrain remove <npcname>命令从游戏世界中移除 NPC。
与 NPC 互动:
- 只需在聊天中输入消息即可与 NPC 互动。
设置 Ollama
Ollama(本地大语言模型)
-
下载 Ollama:
- 访问 Ollama 官网 并下载适用于你操作系统的安装程序。
-
安装并运行 Ollama:
- 按照设置说明进行安装。
- 启动 Ollama 并确保它在后台运行。
-
连接至模组:
- 使用 GUI 创建/编辑 NPC,并填入你的 Ollama 服务器地址(包含 的完整 URL; 如果你在本机 PC 上运行 Ollama,则可以直接使用默认填写的地址)
设置 OpenAi(付费)
- 创建 API Key
- 访问 OpenAi 官网,注册/登录并创建一个 API key
- 复制生成的密钥
- 在模组中使用密钥
- 打开 GUI,使用 LLM 类型
OPENAI创建 NPC,并将密钥粘贴到“Key”字段中。(该密钥绝不会共享给任何拥有 GUI 访问权限的其他客户端,包括你自己的客户端。它将保存在服务器上的 secondbrain 配置文件中)
- 打开 GUI,使用 LLM 类型
与 Player2 App 配合使用
模组会自动将 Player2 App 中选定的角色同步到你的单人世界中的 NPC。 如果你在 Player2 App 中更新了描述或名称,你可以使用命令
/secondbrain player2 SYNC来同步这些更改。 使用此模组无法更改角色的任何配置。
与 NPC 互动
- 在聊天中发送消息或直接发送给特定 NPC
- 按住 alt (Windows) 或 opt (macOS) 键直接与 LLM/AI 对话
- 在配置 GUI 中为任意 NPC 激活文本转语音(Text-To-Speech),以听取 LLM/AI 的输出
设置 Player2(免费,有限制)
-
下载 Player2 App
- 访问 Player2 官网 并下载适用于你操作系统的 App。
-
启动 App 并选择角色
- 启动下载的 App 并选择你想用作 NPC 的角色
许可证
本项目基于 LGPL-3.0 许可证开源
免责声明
鸣谢
本项目使用了以下项目的组件:
感谢这些项目的开发者们出色的工作!
⚠️ Experimental Mod
SecondBrain

A Fabric mod that brings intelligent NPCs to your minecraft world. Create player-like characters controlled by LLMs that respond to your chat messages and perform basic player actions.
This mod works fully serverside. It must also be installed on a client for setup.
Requirements
- Minecraft Version: 1.20.1/1.21.1
- Running Ollama server OR Player2 App OR an OpenAi Key
Mod Installation
- Download the Mod:
- Get the latest version of the
SecondBrainmod from the Modrinth page.
- Get the latest version of the
- Install the Mod:
- Place
secondbrain.jarin yourmodsfolder on your minecraft fabric server and client.
- Place
- Launch Minecraft:
- Start the Minecraft client and the server, and you're ready!
Usage with Ollama/OpenAi
Note: Player must be an operator to execute the following commands
GUI
- Open the gui with the
/secondbraincommand and create/spawn, despawn/delete or edit the NPCs there. - Also edit the base configuration there.
Commands (Deprecated)
Warning: This command uses default ollama/openai settings!
Spawn NPCs:Use the/secondbrain add <npcname> <openai|ollama>(currently only ollama is supported) command to create an NPC. (Example: `/secondbrain add sailex428 OLLAMA)
Remove NPCs:Use the/secondbrain remove <npcname>command to remove an NPC from the game world.
Interact with NPCs:
- Just write in the chat to interact with the NPC.
Setup Ollama
Ollama (Local LLM)
-
Download Ollama:
- Visit Ollamas Website and download the installer for your operating system.
-
Install and Run Ollama:
- Follow the setup instructions to install.
- Start Ollama and ensure it's running in the background.
-
Connect to the Mod:
- Use the gui to create/edit an NPC and put in the address to your ollama server (complete url with if you're running your ollama on your local pc then you can just use the one that's already typed in)
Setup OpenAi (Paid)
- Create API Key
- Visit OpenAi's website, sign up/log in and create a API key
- Copy the created key
- Use the Key in the mod
- Open the GUI and create an NPC with the LLM Type
OPENAIand paste key into the Key field. (The key wont be ever shared with any other clients that has access to the GUI, also not your client. It will be saved in a secondbrain config file on the server)
- Open the GUI and create an NPC with the LLM Type
Usage with Player2 App
The mod will automatically sync the selected Characters from the player2 App to NPCs in your singleplayer world. If you updated a description/name in the player2 App you can sync these changes with the command
/secondbrain player2 SYNCIt's not possible to change any configs from the Character with this mod.
Interact with NPCs
- Write messages in the chat or directly to a specific NPC
- Press and hold alt (win) or opt (macOS) key to talk directly to the LLM/AI
- Activate Text-To-Speech for any NPC in the config gui to hear the LLM/AI output
Setup Player2 (Free, Limited)
-
Download Player2 App
- Visit player2's website and download the App for your operating system.
-
Start the App and select Characters
- Start the downloaded App and select the Characters you wanna use as NPCs
License
This project is licensed under the LGPL-3.0
Disclaimer
Credits
This project utilizes components from the following projects:
Thank you to the developers of these projects for their amazing work!
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
下载 SecondBrain
更新日志
本项目的所有重要更改都将记录在此文件中。
[3.1.7] - 2026-04-18
? Bug Fixes
- 修复漏洞
- Stackoverlow 错误
? Other
- 添加 publishAllVersions 任务
- 合并分支 'add-mc-1-21-11-support'
- 锁定依赖项,添加锁文件
- 提升版本
- 降级 stonecutter
? Documentation
- 更新 3.1.6 版本的更新日志
- 更新 3.1.6 版本的更新日志
- 更新 3.1.7 版本的更新日志
- 更新 3.1.7 版本的更新日志
⚙️ Miscellaneous Tasks
- 更新发布任务名称
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
模组
让你能够在世界中的任何位置定位结构。
模组
对 Minecraft 的沙漠神殿进行了全面重新设计!
模组
感受痛苦!
评论 0
登录后参与评分
还没有评论,来抢沙发吧