|
| 1 | +# Admin and distribution tools |
| 2 | + |
| 3 | +Use these tools in a disposable Creative world while tuning a pack. Surveys |
| 4 | +do not generate terrain or enable OreSpawn's vanilla-ore management. Clearing |
| 5 | +is different: it changes saved blocks, including matching player-placed rocks. |
| 6 | + |
| 7 | +## Measure what actually generated |
| 8 | + |
| 9 | +``` |
| 10 | +/orespawn help |
| 11 | +/orespawn status verbose |
| 12 | +/orespawn chunk |
| 13 | +/orespawn chunk -2 3 |
| 14 | +/orespawn survey 1 |
| 15 | +/orespawn survey 2 --y 0 48 --block minecraft:redstone_ore |
| 16 | +/orespawn survey 0 --center -2 3 --block minecraft:stone@3 |
| 17 | +/orespawn explain minecraft:redstone_ore 100 20 -40 |
| 18 | +/orespawn retrogen status |
| 19 | +/orespawn jobs |
| 20 | +/orespawn jobs <job-id> |
| 21 | +/orespawn cancel <job-id> |
| 22 | +``` |
| 23 | + |
| 24 | +New diagnostic commands require permission level 2. Ordinary `status` remains |
| 25 | +available without operator permission. Existing `reload`, `retrogen [radius]` |
| 26 | +and `dump-biomes` commands keep their behaviour. `retrogen status` never queues |
| 27 | +work, enables retrogen or writes a generation marker. Its completed flag is |
| 28 | +session bookkeeping, not a claim about a chunk's complete history. |
| 29 | + |
| 30 | +Chunk coordinates are block coordinates divided by 16, rounding down, including |
| 31 | +negative coordinates. Without coordinates, commands use the player's chunk; |
| 32 | +the console uses Overworld spawn. Shared options are `--center <chunkX chunkZ>`, |
| 33 | +`--dimension <loaded-numeric-or-namespaced-ID>`, `--y <min max>` and the survey |
| 34 | +filter `--block <namespace:block[@metadata]>`. Heights are inclusive. Radius |
| 35 | +defaults to 1 and is limited to 8: a square of `(2 * radius + 1)` chunks per side. |
| 36 | + |
| 37 | +Only chunks already loaded are visited. The tool records skipped chunks and |
| 38 | +chunks that unload during a scan. A partial report is not a complete regional |
| 39 | +sample. Scans happen over a recorded interval, not at one atomic world instant. |
| 40 | +For a fair comparison, use the same seed, dimensions, coordinates, height range |
| 41 | +and coverage, and avoid mining or construction while collecting the sample. |
| 42 | + |
| 43 | +Reports are stored in the world's `orespawn/diagnostics/reports/<job-id>/`. |
| 44 | +Long chat summaries end in `...`; the saved reports are not shortened. |
| 45 | +Check `jobs <job-id>` for export completion or I/O failure. JSON records block |
| 46 | +states and categories, exact Y levels, biome columns, per-chunk counts, coverage |
| 47 | +and the active profile fingerprint. CSV files provide the same count tables. |
| 48 | +Total sampled volume includes air; non-air volume is reported separately. A |
| 49 | +block filter restricts both those denominators to the matching sample. |
| 50 | + |
| 51 | +Known ores come from native identities, configured outputs and exact Ore |
| 52 | +Dictionary registrations. Blocks are counted once even if several providers |
| 53 | +share them. All observed states are exported, including unclassified blocks. |
| 54 | +Configured fluid outputs are listed separately from ores. Reports do not |
| 55 | +identify which mod historically placed a block or declare that a distribution |
| 56 | +is statistically correct from a small sample. |
| 57 | + |
| 58 | +`explain` uses OreSpawn's actual baked placement budget, host tests and |
| 59 | +chunk-centre biome checks. Frequency means expected attempts per chunk, not |
| 60 | +guaranteed blocks. Weighted host tests, random geometry, exposure rolls and |
| 61 | +private extension checks still affect results. A rock under the cursor today |
| 62 | +is not necessarily the host that existed during original generation. Chunk |
| 63 | +geology information is labelled as a current base-geology prediction, not |
| 64 | +saved formation provenance. |
| 65 | +`chunk` also records observed block states down the centre column, every 16 |
| 66 | +blocks and at the selected range's endpoints. These sparse samples are not a |
| 67 | +whole-chunk count; use `survey 0` for that. |
| 68 | + |
| 69 | +## Expose one chunk, with a way back |
| 70 | + |
| 71 | +``` |
| 72 | +/orespawn clearchunk --center -2 3 |
| 73 | +/orespawn clearchunk confirm <preview-token> |
| 74 | +/orespawn undo <backup-id> |
| 75 | +/orespawn undo <backup-id> confirm <undo-preview-token> |
| 76 | +/orespawn jobs backups |
| 77 | +``` |
| 78 | + |
| 79 | +Clearing and undo require permission level 4. Player operators must be Creative |
| 80 | +or Spectator; clearing is refused while a Survival/Adventure player occupies |
| 81 | +the target chunk. Keep the surrounding lighting area loaded. The aliases |
| 82 | +`/clearchunk` and `/clearchunks` are registered only if another mod has not |
| 83 | +claimed them. Both mean one chunk, not a region. |
| 84 | + |
| 85 | +The first command only scans and prints a preview; no blocks change yet. |
| 86 | +Review the coordinates, height range and removal count, then open chat (T by |
| 87 | +default) and click **Confirm clearing**. That click sends the confirmation |
| 88 | +command. **Cancel** dismisses the preview without changing blocks; **Details** |
| 89 | +opens the job report. Hover over a link to see its exact command. The commands |
| 90 | +above also work when typed, and the server console prints a copyable command. |
| 91 | + |
| 92 | +After clearing, the **Undo…** link starts a restoration preview, not an |
| 93 | +immediate restore. Review it and click **Confirm undo** to restore the blocks. |
| 94 | +Tokens expire after 120 seconds and belong to their operator and snapshot. |
| 95 | +A changed profile or block snapshot requires a new preview. The decay-check |
| 96 | +flag on protected vanilla leaves is ignored: Minecraft updates it while checking |
| 97 | +healthy trees, without changing the blocks being cleared. Removed leaves, |
| 98 | +different leaf types and other block edits still invalidate the preview. Reports |
| 99 | +and backups keep exact states, including leaves configured as removable terrain. |
| 100 | +There is no immediate, unconfirmed clear mode. |
| 101 | + |
| 102 | +Clearing removes recognised native/provider host rocks and background fluids. |
| 103 | +Known ore outputs, configured fluid deposits, bedrock, tile entities and |
| 104 | +unrecognised blocks are protected. Protection wins if a state is both an ore |
| 105 | +and a host. When a configured deposit uses ordinary water or lava, the same |
| 106 | +fluid elsewhere is protected too: there is no reliable historical provenance. |
| 107 | + |
| 108 | +Before the first write, the tool writes, flushes and verifies an immutable |
| 109 | +checksummed journal under `orespawn/diagnostics/backups/<backup-id>/`. |
| 110 | +If that fails, no clearing occurs. Backups are not automatically deleted. |
| 111 | +They remain on disk after restarts; `jobs backups` gives their directory. |
| 112 | +Journals record the Minecraft version and are not interchangeable with backups |
| 113 | +from other Minecraft versions, whose height and block-state encodings differ. |
| 114 | + |
| 115 | +Undo validates every recorded state and checks the current blocks before |
| 116 | +restoring anything. Already-restored cells are harmless; other intervening |
| 117 | +edits cause a conflict rather than being overwritten. Work can be cancelled |
| 118 | +or interrupted, so always inspect its final job status. A partial edit remains |
| 119 | +recoverable from its original journal and never resumes by itself after restart. |
| 120 | +Cancellation stops block writes, then finishes bounded lighting cleanup. If |
| 121 | +the chunk or its lighting area unloads, the report records the interruption |
| 122 | +and the chunk is marked for native relighting instead of claiming completion. |
| 123 | + |
| 124 | +Undo restores recorded block states, not entity movement, elapsed time, mining |
| 125 | +or changes made elsewhere. Fluids from outside the selection can later flow |
| 126 | +back in. It is not a substitute for a full world backup. |
| 127 | + |
| 128 | +One server job runs at a time, yielding after 16,384 block visits or a 4 ms |
| 129 | +cooperative budget. File output runs separately and touches no live world. |
| 130 | +No command expands the loaded chunk set to finish a report or an edit. |
| 131 | +Reports stop with an explicit error above 500,000 count-table rows; individual |
| 132 | +sidecars are limited to 32 MiB. Reduce the area or height range if you hit a |
| 133 | +limit. Existing backups are never removed to make room. |
| 134 | +The file-worker backlog is capped at 32 tasks. A full queue reports failure; |
| 135 | +it never runs file output on the server thread or starts an unbacked edit. |
0 commit comments