refactor: update MCC commands and documentation to use version 1.21.11-Vanilla for consistency across workflows

This commit is contained in:
BruceChen 2026-04-12 20:48:30 +00:00
parent f0b79d5f9c
commit 2b8a8113f5
14 changed files with 1114 additions and 51 deletions

View file

@ -13,7 +13,7 @@ Use this skill when the task needs a real local server loop, not just code readi
- Runtime target: `.NET 10` / `net10.0`
- Environment: Linux, macOS, or WSL with Java, tmux, python3, and dotnet available
- Default server root after `source tools/mcc-env.sh`: `${MCC_SERVERS:-<repo>/MinecraftOfficial/downloads}`
- Default validation target when the user does not specify a version: `1.21.11`
- Default validation target when the user does not specify a server directory: `1.21.11-Vanilla`
## Console modes
@ -51,13 +51,13 @@ Two worktrees can debug against one shared server like this:
# worktree A
cd ~/Minecraft/Minecraft-Console-Client
source tools/mcc-env.sh
mc-start 1.21.11
mcc-debug -v 1.21.11 --file-input
mc-start 1.21.11-Vanilla
mcc-debug -v 1.21.11-Vanilla --file-input
# worktree B
cd ~/Minecraft/Minecraft-Console-Client-foo
source tools/mcc-env.sh
mcc-debug -v 1.21.11 --file-input
mcc-debug -v 1.21.11-Vanilla --file-input
# from each worktree, mcc-* targets that worktree's default session
mcc-state
@ -84,8 +84,8 @@ Before scripted runs, especially on macOS or in a reused tmux environment:
```bash
source tools/mcc-env.sh
mcc-preflight 1.21.11
mc-reset-test-env 1.21.11
mcc-preflight 1.21.11-Vanilla
mc-reset-test-env 1.21.11-Vanilla
```
`mcc-preflight` checks Java, tmux, dotnet, python3, and server directories. It also resolves common Homebrew Java paths on macOS. `mc-reset-test-env` clears stale tmux sessions and stale `stdin.pipe` files before they turn into misleading startup failures.
@ -107,16 +107,16 @@ Interactive shell:
source tools/mcc-env.sh
SESSION="$(_mcc_resolve_session)"
USERNAME="$(_mcc_resolve_username "$SESSION")"
mc-start 1.21.11
mc-log 1.21.11 100
mc-start 1.21.11-Vanilla
mc-log 1.21.11-Vanilla 100
mc-rcon "op $USERNAME"
mc-stop 1.21.11
mc-stop 1.21.11-Vanilla
```
Non-interactive shell:
```bash
tools/start-server.sh 1.21.11
tools/start-server.sh 1.21.11-Vanilla
tools/mc-rcon.sh "op mcc_smoke_a"
```
@ -135,19 +135,19 @@ The `tools/mcc-debug.sh` script handles build, server startup, config preparatio
source tools/mcc-env.sh
# Classic mode with FileInput (script-driven debugging):
mcc-debug -v 1.21.11 --file-input
mcc-debug -v 1.21.11-Vanilla --file-input
# Classic mode interactive (attach via tmux):
mcc-debug -v 1.21.11
mcc-debug -v 1.21.11-Vanilla
# TUI mode:
mcc-debug -v 1.21.11 -m tui
mcc-debug -v 1.21.11-Vanilla -m tui
# With debug messages enabled from start:
mcc-debug -v 1.21.11 --file-input --debug-on
mcc-debug -v 1.21.11-Vanilla --file-input --debug-on
# Skip build (already built):
mcc-debug -v 1.21.11 --file-input --no-build
mcc-debug -v 1.21.11-Vanilla --file-input --no-build
```
### What mcc-debug.sh does
@ -202,7 +202,7 @@ For agents calling MCC commands programmatically:
```bash
source tools/mcc-env.sh
SESSION="smoke-a"
mcc-debug -v 1.21.11 --file-input --session "$SESSION" --no-build
mcc-debug -v 1.21.11-Vanilla --file-input --session "$SESSION" --no-build
# Send commands:
mcc-cmd --session "$SESSION" "debug state"
@ -215,7 +215,7 @@ mcc-log-mcc --session "$SESSION"
# Stop:
mcc-cmd --session "$SESSION" "quit"
mcc-kill --session "$SESSION"
mc-stop 1.21.11
mc-stop 1.21.11-Vanilla
```
### Interactive workflow
@ -223,7 +223,7 @@ mc-stop 1.21.11
```bash
source tools/mcc-env.sh
SESSION="live-a"
mcc-debug -v 1.21.11 --session "$SESSION"
mcc-debug -v 1.21.11-Vanilla --session "$SESSION"
# In another terminal:
tmux attach -t "mcc-$SESSION"
@ -245,7 +245,7 @@ TUI mode runs Consolonia full-screen in a tmux session. Key differences:
```bash
source tools/mcc-env.sh
SESSION="tui-a"
mcc-debug -v 1.21.11 -m tui --session "$SESSION" --no-build
mcc-debug -v 1.21.11-Vanilla -m tui --session "$SESSION" --no-build
# Cannot use mcc-cmd (no FileInput); must use tmux send-keys:
tmux send-keys -t "mcc-$SESSION" "/debug state" Enter
@ -330,12 +330,12 @@ If a scripted run fails before MCC joins, check for a harness problem before ass
## Typical debug loop
1. `source tools/mcc-env.sh`
2. `mcc-debug -v 1.21.11 --file-input` (or `-m tui`)
2. `mcc-debug -v 1.21.11-Vanilla --file-input` (or `-m tui`)
3. Confirm `Server was successfully joined` in log
4. `mcc-cmd "debug state"` to verify MCC state
5. Run test commands
6. Inspect log output
7. `mcc-cmd "quit"` and `mc-stop 1.21.11`
7. `mcc-cmd "quit"` and `mc-stop 1.21.11-Vanilla`
8. Edit code, rebuild, repeat
## Debugging tips

View file

@ -10,7 +10,7 @@
- Init submodules first: `git submodule update --init --recursive`
- Build for local development: `source tools/mcc-env.sh && mcc-build`
- Publish (matches CI shape): `source tools/mcc-env.sh && mcc-publish --rid <RID>`
- Run/debug from source: `source tools/mcc-env.sh && mcc-debug -v 1.21.11 --file-input`
- Run/debug from source: `source tools/mcc-env.sh && mcc-debug -v 1.21.11-Vanilla --file-input`
- Docs: `cd docs && npm install && npm run docs:dev` or `npm run docs:build`
- Docker: `cd Docker && docker build -t minecraft-console-client:latest .`
- Tests: no dedicated test project is present in the main solution.

View file

@ -458,13 +458,13 @@ Two worktrees can share one local server like this:
# worktree A
cd ~/Minecraft/Minecraft-Console-Client
source tools/mcc-env.sh
mc-start 1.21.11
mcc-debug -v 1.21.11 --file-input
mc-start 1.21.11-Vanilla
mcc-debug -v 1.21.11-Vanilla --file-input
# worktree B
cd ~/Minecraft/Minecraft-Console-Client-foo
source tools/mcc-env.sh
mcc-debug -v 1.21.11 --file-input
mcc-debug -v 1.21.11-Vanilla --file-input
# from each worktree, mcc-* targets that worktree's default session
mcc-state

View file

@ -320,7 +320,7 @@ Run:
```bash
source tools/mcc-env.sh
mcc-debug -v 1.21.11 --file-input --no-build
mcc-debug -v 1.21.11-Vanilla --file-input --no-build
ls -la /tmp/mcc-debug
tmux list-sessions | grep '^mcc-debug:'
```
@ -432,8 +432,8 @@ Run:
```bash
source tools/mcc-env.sh
mcc-debug -v 1.21.11 --session smoke-a --username SmokeA --file-input --no-build
mcc-debug -v 1.21.11 --session smoke-b --username SmokeB --file-input --no-build
mcc-debug -v 1.21.11-Vanilla --session smoke-a --username SmokeA --file-input --no-build
mcc-debug -v 1.21.11-Vanilla --session smoke-b --username SmokeB --file-input --no-build
test -f "$(_mcc_session_log_file smoke-a)"
test -f "$(_mcc_session_log_file smoke-b)"
test -f "$(_mcc_session_meta_file smoke-a)"
@ -602,7 +602,7 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
source "$REPO_ROOT/tools/mcc-env.sh"
source "$SCRIPT_DIR/common.sh"
VERSION="${1:-1.21.11}"
VERSION="${1:-1.21.11-Vanilla}"
SESSION_A="parallel-a"
SESSION_B="parallel-b"
USER_A="ParallelA"
@ -631,7 +631,7 @@ mc-log "$VERSION" 50 | grep -Fq "$USER_B joined the game"
- [ ] **Step 2: 运行脚本,确认它先因为新参数或旧的共享路径逻辑而失败**
Run: `bash .skills/mcc-integration-testing/scripts/run_parallel_session_smoke_test.sh 1.21.11`
Run: `bash .skills/mcc-integration-testing/scripts/run_parallel_session_smoke_test.sh 1.21.11-Vanilla`
Expected: FAIL错误类似 `Unknown option: --session`、固定 `mcc_input.txt` 被共用,或者只有一个客户端会话存活
@ -680,9 +680,9 @@ mkdir -p "$(_mcc_session_root "$SESSION")"
Run:
```bash
bash .skills/mcc-integration-testing/scripts/run_parallel_session_smoke_test.sh 1.21.11
bash tools/run-creative-e2e.sh 1.21.11 1.21.11 modern
bash .skills/mcc-integration-testing/scripts/run_full_spectrum_test.sh 1.21.11
bash .skills/mcc-integration-testing/scripts/run_parallel_session_smoke_test.sh 1.21.11-Vanilla
bash tools/run-creative-e2e.sh 1.21.11-Vanilla 1.21.11 modern
bash .skills/mcc-integration-testing/scripts/run_full_spectrum_test.sh 1.21.11-Vanilla
```
Expected: 三个脚本都 PASS并行 smoke test 中一个 session 被 kill 后,另一个 session 和共享服务器继续存活
@ -722,13 +722,13 @@ git commit -m "test: cover shared server with isolated MCC sessions"
# worktree A
cd ~/Minecraft/Minecraft-Console-Client
source tools/mcc-env.sh
mc-start 1.21.11
mcc-debug -v 1.21.11 --file-input
mc-start 1.21.11-Vanilla
mcc-debug -v 1.21.11-Vanilla --file-input
# worktree B
cd ~/Minecraft/Minecraft-Console-Client-foo
source tools/mcc-env.sh
mcc-debug -v 1.21.11 --file-input
mcc-debug -v 1.21.11-Vanilla --file-input
# Each worktree gets:
# - its own session
@ -761,7 +761,7 @@ Run:
bash tools/test-mcc-env.sh
source tools/mcc-env.sh && unset MCC_BUILD_MODE && mcc-build
source tools/mcc-env.sh && export MCC_BUILD_MODE=tmpfs && mcc-build
bash .skills/mcc-integration-testing/scripts/run_parallel_session_smoke_test.sh 1.21.11
bash .skills/mcc-integration-testing/scripts/run_parallel_session_smoke_test.sh 1.21.11-Vanilla
```
Expected:

View file

@ -403,7 +403,7 @@ Expected: `Build succeeded.`
Run:
```bash
bash tools/test-pathing-template-regressions.sh 1.21.11
bash tools/test-pathing-template-regressions.sh 1.21.11-Vanilla
```
Expected:

File diff suppressed because it is too large Load diff

View file

@ -861,7 +861,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$REPO_ROOT/tools/mcc-env.sh"
VERSION="${1:-1.21.11}"
VERSION="${1:-1.21.11-Vanilla}"
INPUT_FILE="$REPO_ROOT/mcc_input.txt"
LOG_DIR="${TMPDIR:-/tmp}/mcc-debug"
LOG_FILE="$LOG_DIR/mcc-template-regressions.log"
@ -913,7 +913,7 @@ Run:
```bash
dotnet test MinecraftClient.Tests/MinecraftClient.Tests.csproj -v minimal
dotnet build MinecraftClient.sln -c Release
bash tools/test-pathing-template-regressions.sh 1.21.11
bash tools/test-pathing-template-regressions.sh 1.21.11-Vanilla
```
Expected:
@ -975,7 +975,7 @@ Before calling this project done, the implementing agent must have fresh evidenc
- `ClimbFallTemplateTests` passes
- full `MinecraftClient.Tests` project passes
- `dotnet build MinecraftClient.sln -c Release` passes
- `tools/test-pathing-template-regressions.sh 1.21.11` shows positive runtime evidence for:
- `tools/test-pathing-template-regressions.sh 1.21.11-Vanilla` shows positive runtime evidence for:
- flat final stop stays within target block support
- parkour into L-turn completes without rescue replan
- accepted 2x1 side-wall jump completes

View file

@ -1435,7 +1435,7 @@ set -euo pipefail
source "$(dirname "$0")/mcc-env.sh"
VERSION="1.21.11"
VERSION="1.21.11-Vanilla"
SESSION="mcc-brake-test"
CFG="/tmp/mcc-debug/MinecraftClient.debug.ini"

View file

@ -199,8 +199,8 @@ Expected defaults:
Example commands:
```bash
mcc-debug -v 1.21.11 --session alice-a --username AliceA --file-input
mcc-debug -v 1.21.11 --session alice-b --username AliceB --file-input
mcc-debug -v 1.21.11-Vanilla --session alice-a --username AliceA --file-input
mcc-debug -v 1.21.11-Vanilla --session alice-b --username AliceB --file-input
mcc-cmd --session alice-a "debug state"
mcc-log-mcc --session alice-b
mcc-kill --session alice-a
@ -266,7 +266,7 @@ When possible, the error should print the resolved repo root, shared server root
### Manual Verification Matrix
1. Build from two different worktrees at the same time and confirm isolated output roots.
2. Start one shared `1.21.11` server and confirm only one `mc-1_21_11` session exists.
2. Start one shared `1.21.11-Vanilla` server and confirm only one `mc-1_21_11-Vanilla` session exists.
3. Launch two MCC sessions from two different worktrees without explicit usernames and confirm distinct derived usernames.
4. Join both clients to the shared server and confirm neither client disconnects the other.
5. Send different commands through each session's input file and confirm only the intended client responds.

View file

@ -10,8 +10,8 @@ The `tools/` directory also contains the shell helpers used for day-to-day MCC d
```bash
source tools/mcc-env.sh
mc-start 1.21.11
mcc-debug -v 1.21.11 --file-input
mc-start 1.21.11-Vanilla
mcc-debug -v 1.21.11-Vanilla --file-input
mcc-cmd "debug state"
mcc-publish --rid linux-x64
```

View file

@ -314,4 +314,3 @@ fi
echo "Quick commands:"
echo " mc-rcon 'op $USERNAME' # Give operator"
echo " mc-rcon 'gamemode creative' # Creative mode"
echo " mc-stop $VERSION # shared server stays up by default; rerun with --confirm only when needed"

View file

@ -5,7 +5,7 @@
# Prerequisites:
# - MCC connected with FileInput mode
# - CursorBot is OP
# - Server at 1.21.11
# - Server at 1.21.11-Vanilla
set -euo pipefail
source "$(dirname "$0")/mcc-env.sh"

View file

@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$REPO_ROOT/tools/mcc-env.sh"
VERSION="${1:-1.21.11}"
VERSION="${1:-1.21.11-Vanilla}"
SESSION="mcc-pathing-template"
TEST_ROOT="${TMPDIR:-/tmp}/mcc-pathing-template"
CFG="$TEST_ROOT/MinecraftClient.pathing-template.ini"

View file

@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$REPO_ROOT/tools/mcc-env.sh"
VERSION="${1:-1.21.11}"
VERSION="${1:-1.21.11-Vanilla}"
SESSION="mcc-brake-test"
TEST_ROOT="${TMPDIR:-/tmp}/mcc-debug"
CFG="$TEST_ROOT/MinecraftClient.transition-braking.ini"