Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,27 +236,42 @@ ModFactory 不仅做模组,也能设计和验证整合包:

## 环境要求

- **AI Agent**:Claude Code / Cursor / 通用 Agent(能读写文件、执行命令)
- **Java 21+**:Minecraft 1.21.11 运行环境
- **Node.js 18+**:MCP 服务运行环境
- **Blockbench**:3D 模型编辑器(可选,实体管线需要)
- **PowerShell**:纹理引擎运行环境
| 组件 | Windows | macOS | Linux |
|------|---------|-------|-------|
| AI Agent | Claude Code / Cursor / 通用 Agent | 同左 | 同左 |
| Java 21+ | [Adoptium](https://adoptium.net/) | `brew install openjdk@21` | `apt install openjdk-21-jdk` |
| Node.js 18+ | [nodejs.org](https://nodejs.org/) | `brew install node` | `apt install nodejs` |
| Blockbench | [blockbench.net](https://www.blockbench.net/) | `brew install --cask blockbench` | AppImage |
| PowerShell | 系统自带 | `brew install powershell` | `apt install powershell` |

> PowerShell 是纹理引擎(GearFactory forge.ps1)的运行环境。macOS/Linux 用户需安装 `powershell`(pwsh)。


## 安装

```bash
# 一键安装(安装 MCP 服务 + 克隆 GearFactory + 配置 Claude Code)
# macOS / Linux 一键安装
chmod +x install.sh && ./install.sh

# Windows 一键安装
install.bat

# 或手动安装
# 或手动安装(所有平台通用)
npm install -g @mcdxai/minecraft-dev-mcp # MC 源码实时访问
npm install -g mcmodding-mcp # Fabric 官方文档检索
git clone https://github.com/buyicoder/GearFactory.git forge_engine
```

安装后在 Claude Code 中直接使用 `/mc-mod-master` 即可触发。

### 启动开发客户端

```bash
cd fabric-mod-dev
./gradlew runClient # macOS / Linux
gradlew.bat runClient # Windows
```


## 核心设计文档

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,11 @@ Write-Host "PASS"
Run after a `runClient` session:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\qa-runclient-check.ps1 -LogPath C:\Users\Lenovo\.cursor\projects\d-MC\terminals\<terminal-id>.txt
# PowerShell (cross-platform via pwsh on macOS/Linux)
pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/qa-runclient-check.ps1 -LogPath terminals/<terminal-id>.txt

# Or on Windows:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\qa-runclient-check.ps1 -LogPath terminals\<terminal-id>.txt
```

Expected:
Expand Down
20 changes: 20 additions & 0 deletions fabric-mod-dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Gradle
.gradle/
build/

# Minecraft runtime
run/

# IDE
.idea/
*.iml
*.ipr
*.iws

# OS
.DS_Store
Thumbs.db

# Logs
*.log
logs/
69 changes: 69 additions & 0 deletions fabric-mod-dev/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
plugins {
id 'fabric-loom' version '1.9-SNAPSHOT'
id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
}

loom {
splitEnvironmentSourceSets()

mods {
"rubythunder" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

processResources {
inputs.property "version", project.version
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}

publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
repositories {
}
}
11 changes: 11 additions & 0 deletions fabric-mod-dev/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true

minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.19.3
fabric_version=0.116.15+1.21.1

mod_version=1.0.0
maven_group=com.example
archives_base_name=rubythunder
Binary file added fabric-mod-dev/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions fabric-mod-dev/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading