Skip to content

Commit 308571b

Browse files
committed
feat<docs>: update repo docs
1 parent 30dee64 commit 308571b

7 files changed

Lines changed: 1802 additions & 0 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ run
2525

2626
# Files from Forge MDK
2727
forge*changelog.txt
28+
deep-research-report.md
29+
DEV.md

AGENTS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Agents 角色与职责
2+
3+
## 1. RequirementAgent (需求分析)
4+
- **职责**:拆解整体需求,产出明确的功能需求列表和模块任务分解。
5+
- **示例提示**:请根据项目背景,列出实现 OSC 聊天功能所需的主要组件和接口,以及它们的功能描述。
6+
- **交互示例**
7+
- **User**: “需要实现 VRChat OSC 聊天模块,请拆解任务。”
8+
- **Agent**: 提供 OSC 接收、解析、权限验证、消息队列、主线程派发等任务。
9+
10+
## 2. DesignAgent (架构设计)
11+
- **职责**:根据需求分析结果,设计系统架构图和模块类图,定义模块之间接口和数据流。
12+
- **示例提示**:绘制组件关系图(drawio),并说明每个模块的责任和接口。
13+
- **输出**:drawio 类图/流程图、模块职责说明表。
14+
15+
## 3. ParserAgent (协议解析)
16+
- **职责**:实现或使用 OSC 协议解析功能,包括字节流与 OSCMessage 的互转。
17+
- **提示模板**`请实现OSC协议解析功能,包括 Address Pattern 和 Type Tags 的解析,遵循OSC 1.0规范。`
18+
- **测试用例**:传入不同类型的OSC消息字节数组,验证解析结果是否正确。
19+
20+
## 4. ChatEventAgent (消息处理)
21+
- **职责**:将OSC消息转换为内部ChatEvent对象,并执行权限和内容检查。
22+
- **提示示例**`处理接收到的OSC消息,如果地址为"/vrchat/chat"且来源信任,则创建ChatEvent并加入队列。否则记录日志并丢弃。`
23+
- **测试案例**:传入合法与非法的OSC消息,确认队列接收和拒绝日志。
24+
25+
## 5. DispatcherAgent (Minecraft注入)
26+
- **职责**:在Minecraft主线程中消费消息队列,将ChatEvent内容注入服务器聊天。
27+
- **提示示例**`订阅Forge的Tick事件,从队列取消息并调用MinecraftAPI发送聊天信息。确保线程安全。`
28+
- **测试案例**:启动虚拟服务器,检查收到OSC消息后是否正确在聊天框显示。
29+
30+
## 6. TestAgent (自动化测试)
31+
- **职责**:编写单元/集成测试用例,验证核心功能与接口契约。
32+
- **提示示例**`为OscReceiver编写单元测试:模拟UDP数据包,验证解析结果。`
33+
- **执行**:使用JUnit测试消息解析、权限过滤、日志输出等。
34+
35+
# 示例交互
36+
1. **设计交互**
37+
- 提示:`绘制包括OscReceiver、PermissionManager、ForgeAdapter的系统流程图。`
38+
- Agent输出:Mermaid流程图代码。
39+
40+
2. **代码交互**
41+
- 提示:`在OscReceiver的onPacketReceived方法加入错误处理:当解析异常时记录日志并跳过该消息。`
42+
- Agent输出:Java代码片段更新。
43+
44+
# 自动文档与注释生成
45+
- 使用语言模型自动补全注释:提供方法签名和简短说明,请 LLM 展开详细注释说明。
46+
- 示例模板:`/** * 方法功能:解析OSC消息并调用handler。参数说明:... */`
47+
48+
# 任务分解清单
49+
- OSC 接收服务
50+
- OSC 消息解析
51+
- 权限验证模块
52+
- 消息队列
53+
- Minecraft 事件订阅与注入
54+
- 配置和日志模块
55+
- 单元/集成测试
56+
- CI/CD 配置
57+
58+
@RTK.md

CREDITS.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Minecraft Forge: Credits/Thank You
2+
3+
Forge is a set of tools and modifications to the Minecraft base game code to assist
4+
mod developers in creating new and exciting content. It has been in development for
5+
several years now, but I would like to take this time thank a few people who have
6+
helped it along it's way.
7+
8+
First, the people who originally created the Forge projects way back in Minecraft
9+
alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptiance
10+
of me taking over the project, who knows what Minecraft modding would be today.
11+
12+
Secondly, someone who has worked with me, and developed some of the core features
13+
that allow modding to be as functional, and as simple as it is, cpw. For developing
14+
FML, which stabelized the client and server modding ecosystem. As well as the base
15+
loading system that allows us to modify Minecraft's code as elegently as possible.
16+
17+
Mezz, who has stepped up as the issue and pull request manager. Helping to keep me
18+
sane as well as guiding the community into creating better additions to Forge.
19+
20+
Searge, Bspks, Fesh0r, ProfMobious, and all the rest over on the MCP team {of which
21+
I am a part}. For creating some of the core tools needed to make Minecraft modding
22+
both possible, and as stable as can be.
23+
On that note, here is some specific information of the MCP data we use:
24+
* Minecraft Coder Pack (MCP) *
25+
Forge Mod Loader and Minecraft Forge have permission to distribute and automatically
26+
download components of MCP and distribute MCP data files. This permission is not
27+
transitive and others wishing to redistribute the Minecraft Forge source independently
28+
should seek permission of MCP or remove the MCP data files and request their users
29+
to download MCP separately.
30+
31+
And lastly, the countless community members who have spent time submitting bug reports,
32+
pull requests, and just helping out the community in general. Thank you.
33+
34+
--LexManos
35+
36+
=========================================================================
37+
38+
This is Forge Mod Loader.
39+
40+
You can find the source code at all times at https://github.com/MinecraftForge/MinecraftForge/tree/1.12.x/src/main/java/net/minecraftforge/fml
41+
42+
This minecraft mod is a clean open source implementation of a mod loader for minecraft servers
43+
and minecraft clients.
44+
45+
The code is authored by cpw.
46+
47+
It began by partially implementing an API defined by the client side ModLoader, authored by Risugami.
48+
http://www.minecraftforum.net/topic/75440-
49+
This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader.
50+
51+
It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge.
52+
http://www.minecraftforge.net/
53+
54+
Additionally, it contains an implementation of topological sort based on that
55+
published at http://keithschwarz.com/interesting/code/?dir=topological-sort
56+
57+
It also contains code from the Maven project for performing versioned dependency
58+
resolution. http://maven.apache.org/
59+
60+
It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/
61+
with credit to it's authors.
62+
63+
Forge Mod Loader downloads components from the Minecraft Coder Pack
64+
(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team.
65+

0 commit comments

Comments
 (0)