Fail fast on missing terrain assets and recover empty renders

This commit is contained in:
2026-10-04 22:32:11 +05:00
parent 79d0f53a79
commit 763cf8713c
15 changed files with 842 additions and 21 deletions

View File

@@ -68,6 +68,29 @@ If the worker stops renewing its lease, the page warns that it has stopped repor
- `minegeo status` reports the active stage and the last completed export folder.
- `minegeo help` lists commands.
If processing fails on the website, read the draft's error. Fix the worker/setup or reduce the export area, then create and upload a new export. Keep the old folders until you no longer need them.
If processing fails on the website, read the draft's error. A renderer/setup failure can be retried using the already uploaded export; you do not need to export or upload it again.
### Recover an empty render
A report with `meshes: 0`, `emittedFaces: 0`, and ordinary blocks such as stone and dirt in `unsupported` means Minecraft assets did not reach the renderer. Those renders previously completed incorrectly with sky-only images. Assets are local to each host: the ignored `.cache` folder does not transfer when pulling Git changes.
The worker now prepares missing/incomplete vanilla assets before rendering. Setup prepares them before installing Chromium, so a browser installation failure cannot skip the asset download. A completion marker is written after extraction; core models/textures are checked on subsequent runs. Missing models, zero geometry, lost graphics contexts and sky-only downward/map images fail processing instead of producing a playable draft.
To regenerate an existing unpublished draft after pulling this fix:
1. Stop MineGeo with Ctrl+C so its worker is stopped.
2. Run this from the repository root, replacing the UUID with the draft's ID:
```sh
npm run reprocess -- 00ff0076-cae1-4a0d-ab81-9014833309f4
```
3. Restart with your usual `npm run dev` or `npm start` command. On the Mac test server:
```sh
PORT=3008 MINEGEO_HOST=0.0.0.0 MINEGEO_ALLOW_ANY_ORIGIN=true npm run dev
```
The maintenance command prepares plugin rendering assets, keeps the original raw export, clears the previous preview metadata and queues a fresh render. It refuses published revisions and active jobs. Inspect the regenerated private draft and submit it for review again. If the export itself is invalid, create and upload a corrected export instead.
Expected limits: Minecraft 1.21.11 / Java 21, Overworld only, five or more safe viewpoints, at most 2048 blocks per selected side and the worker's terrain/file-size limits. A large selection may need to be split into smaller maps.