# Mcast-WorldMapScanner

Mcast-WorldMapScanner creates a precise static top-down PNG map from the chunks already stored in one Paper world.

## Main features

- One Minecraft block always equals one source pixel.
- Scans existing chunks without generating new terrain.
- Automatic stored-world bounds or an exact square selected by center and edge length.
- Material, biome, height, water-depth and surface-detail rendering.
- Transparent space where selected chunks do not exist.
- One crisp source PNG map and one smaller web copy without smoothing blur.
- Safe pause, resume and atomic file output.
- Continuous cleanup of verified intermediate files.

## Commands

/worldmapscanner start
/worldmapscanner status
/worldmapscanner pause
/worldmapscanner resume
/worldmapscanner stop
/worldmapscanner speed <1-64>
/worldmapscanner center <x> <z>
/worldmapscanner size <blocks>
/worldmapscanner area auto
/worldmapscanner help

`center` or `size` selects square mode for the next run. `area auto` returns to all stored chunks of the selected world. `stop` cancels and removes the incomplete run.

## Output

Finished maps are stored directly in:

plugins/Mcast-WorldMapScanner/output/

When the selected area is at most 8192 × 8192 blocks, the output contains exactly two files:

- `world-map.png` — the source map at the area's real dimensions, 1 block = 1 pixel,
- `world-map-web.png` — one smaller crisp copy of the complete area for the web.

A larger area keeps the main 8192 × 8192 `world-map.png` and adds fixed neighbouring maps: north, south, east, west and the four corners. A still larger world adds complete outer rings of the same coordinate grid. The map is never rescaled or redistributed into equally sized quarters.

Only an internal `.working-<world>-<time>` directory exists while a scan is running. After the PNG files have been published safely, it and all technical intermediate files are removed; only the finished maps remain in the output directory.

## Performance

Render time follows mapped area: doubling both square edges means roughly four times as many blocks. Higher `speed` may reduce render time, but increases RAM and server load; raise it carefully.

Large runs can temporarily use substantial disk space. The plugin composes the map through safe power-of-two stages and removes small inputs only after their successor has been written. Completed source maps remain as the product.

## Technical information

- Paper 1.21.11 / Minecraft 1.21.x
- Java 21
- Server-side and OP-only by default
- Permission: `mcast.worldmapscanner.use`

Version 2.1 keeps the fixed 1:1 source scale, composes the image progressively through power-of-two working stages and publishes only the finished map files. A detected 1.x config is backed up as `config-before-2.0.0.yml` and migrated to the concise format.

**Author:** mcast
**Website:** https://www.mc-amethyst.com
