Separate map projects and add reusable island and operator camera tools

This commit is contained in:
Emil
2026-09-13 20:43:42 +03:00
parent 89c53d7058
commit 224b29f0e7
158 changed files with 633 additions and 34966 deletions
+14
View File
@@ -47,6 +47,20 @@ python3 scripts/live-camera-test.py --camera-id test --delay 8
Before capture begins, return to Minecraft, close chat and menus, stop moving, and keep the mouse still. Rotation tolerance is only 0.1°, so even slight movement cancels the image. Switching windows may open the pause menu. In this mode, capture temporarily uses your game view; the server teleport changes your position. Your game mode and previous position are not restored automatically. Choose the desired mode and location manually when returning to building.
### Operator capture of an already positioned observer
[scripts/camera-capture.py](../scripts/camera-capture.py) can inspect a separate world after an authorized operator has placed the spectator there. This local CLI is not an additional MCP tool: it neither teleports nor edits the world, and does not change Paper's active editor project. Use the actual client dimension key and observer feet position:
```bash
MCB_RUNTIME_DIR=/path/to/map/.runtime python3 scripts/camera-capture.py \
--dimension minecraft:overworld --pose 16.5 90 16.5 45 25 --fov 80 \
--out /path/to/map/.runtime/captures/overview.png
```
The default private config is `MCB_RUNTIME_DIR/server/plugins/MinecraftBuilderMCP/config.yml`, falling back to this checkout's `.runtime/server`. `MCB_CAMERA_PAPER_CONFIG` overrides that default; `--config` overrides both. The helper disables proxies and redirects, authenticates to `127.0.0.1`, bounds responses, correlates the capture UUID/dimension/timestamp, and checks the PNG and its dimensions. It writes unchanged PNG bytes and an allowlisted `.capture.json` receipt with a SHA-256. It does not certify a server revision or restore the operator's previous viewpoint. Existing output files at the selected paths are replaced. The normal readiness and spectator requirements still apply.
When positioning through the vanilla console, write explicit decimal X/Z coordinates, such as `16.0`, when the capture requests exactly `16.0`. Integer X/Z arguments to `/teleport` select block centres and can become `16.5`. That half-block offset exceeds the camera's position tolerance and causes a timeout. Use the same feet position, dimension and rotation in the teleport and capture request. A completed real-world smoke capture verified this operator path on Paper 26.2; it remains separate from the MCP project's scoped camera route.
## Protocol
All requests, including health checks and image retrieval, require `Authorization: Bearer <MCB_CAMERA_TOKEN>`. JSON is not written to the log.