Skip to content

KalpeGames/world-viewer

Repository files navigation

World Viewer (Fabric, MC 1.21.8 & 1.21.11)

A client-side world viewer and downloader, in the spirit of the old WorldDownloader / "Wildcard" mods, with the one feature they never had: a live map of exactly which chunks you've downloaded, not just a count.

As you move around a server, the chunks the server streams to your client are saved into a normal Anvil world save you can open in singleplayer. Areas you never visited generate as void, so the edge of your download is obvious at a glance.

⚠️ Status: MVP. It builds cleanly and the chunk serialization reuses Minecraft's own (byte-exact) save code, but it has not yet been run in-game on your setup; see Known limitations. If a downloaded world fails to open, the most likely culprit is level.dat (see notes); tell me what the log says and it's a quick fix.


Requirements

  • Minecraft 1.21.8 or 1.21.11 with Fabric Loader (0.16+). Use the jar that matches your version.
  • Fabric API for your Minecraft version, in your mods folder

Install

  1. Install the Fabric loader for your Minecraft version (via the official Fabric installer or your launcher).
  2. Drop two jars into .minecraft/mods/:
    • the build that matches your version: world-viewer-0.2.0+mc1.21.8.jar or world-viewer-0.2.0+mc1.21.11.jar
    • fabric-api-*.jar
  3. Launch the Fabric profile.

How to use

Auto-download is ON by default. Just join a server and start moving, and every chunk the server sends is saved as you load it, a status indicator shows at the top of the screen, and the map fills in live.

Command / key What it does
Press M Open the 3D map (rebindable in /wdl settings, or Controls → "World Viewer").
/wdl save Force-save every chunk currently loaded around you, and (re)write level.dat.
/wdl auto on / off Toggle automatic downloading.
/wdl detail on / off Toggle full 3D voxel capture (more CPU/RAM).
/wdl output <folder> Set where worlds are saved (blank = .minecraft/saves).
/wdl settings Open the settings panel.
/wdl status Show state, saved/loaded counts, and the output folder.
/wdl map Open the map via command.

The map

A 3D voxel view by default, plus a flat 2D top-down map (toggle with the View button or V). Brightly-coloured chunks are saved to disk; dimmed chunks are loaded but not yet saved.

Two cameras (toggle with the Cam button or F):

  • Orbit: right-drag rotate, left-drag pan, scroll to zoom.
  • Fly: a free "drone": WASD move, space/shift up/down, drag to look, scroll to change speed.

Other controls: [ / ] change how far out full voxel detail renders · AA button toggles anti-aliasing · Recenter snaps back to you · Settings opens the config panel.

Settings (/wdl settings)

Auto-download, 3D detail capture, anti-aliasing, and the save folder, all persisted to config/wdl.json.

Where the world goes

<save folder>/WDL_<server-address>/ (default save folder is .minecraft/saves).

Re-downloading the same server reuses the same folder, so coverage accumulates across sessions. The Nether and End are written into DIM-1 / DIM1 of the same world, so flying through a portal and saving captures those dimensions too. Open the world in singleplayer (Creative) when you're done.


Known limitations

These are inherent to a client-side downloader, not bugs:

  • You can only save what the server sends you, i.e. chunks within your render distance. To download an area, you have to go there (fly around to load it). Bumping your render distance up loads more at once.
  • Container contents are usually empty. Servers don't send chest/barrel/shulker inventories to the client until you actually open them, so most containers download empty. Signs, banners, and similar block data that is sent will be saved.
  • No entities (mobs, item frames, paintings) in this MVP: only blocks, block entities, biomes, and lighting.
  • 1.21.8 and 1.21.11. Both are built from one source tree (see Building). Further versions can be added as extra build targets; broad protocol-agnostic support is still a larger separate effort.
  • Server rules. Many servers' rules forbid downloading/world-ripping. Use this on your own servers, singleplayer, or where you have permission.

If a downloaded world won't open

The chunk data is produced by Minecraft's own SerializedChunk.serialize(), so the region files should be correct. The hand-written level.dat (flat-void generator) is the one part not produced by vanilla code. If the world fails to load, grab the error from .minecraft/logs/latest.log and it's a targeted fix.


Building from source

This is a multi-version project: one source tree targets several Minecraft versions through Stonecutter. The few places where the 1.21.8 and 1.21.11 APIs differ (the rendering and input changes Mojang made between them) are guarded with //? if comments, and each target's settings live in versions/<mc>/gradle.properties.

The build runs on Gradle 9 (the wrapper fetches it) and is pinned to JDK 21 via gradle.properties (org.gradle.java.home), because the machine default JDK is newer than Loom 1.13 supports. Adjust or delete that line if JDK 21 is already your default.

./gradlew build          # builds every version at once

Output, one jar per version:

  • versions/1.21.8/build/libs/world-viewer-0.2.0+mc1.21.8.jar
  • versions/1.21.11/build/libs/world-viewer-0.2.0+mc1.21.11.jar

To work on one version in your IDE, set it active (this rewrites the //? if comments in place):

./gradlew "Set active project to 1.21.8"     # or 1.21.11
./gradlew "Reset active project"             # back to the committed default; run before committing

To add another Minecraft version: add it to versions(...) in settings.gradle.kts, create versions/<mc>/gradle.properties (copy an existing one; set minecraft_version, yarn_mappings, fabric_version, minecraft_dep), then guard any new API differences with //? if >=<mc> { … }.

To regenerate decompiled Minecraft sources for reference: ./gradlew genSources.

How it works (short version)

  • ChunkTracker: per-dimension sets of seen / loaded / saved chunks (backs the map + save logic).
  • ClientChunkSerializer: builds a net.minecraft.world.chunk.SerializedChunk record directly from a client WorldChunk (vanilla's fromChunk needs a ServerWorld we don't have) and calls serialize(), reusing Minecraft's exact palette/biome/heightmap/light/DataVersion writing.
  • RegionFileWriter: a small, dependency-free writer for the Anvil .mca container format.
  • LevelDatWriter: writes a minimal flat-void level.dat.
  • WorldSaver: routes chunks to the right per-dimension region files on a background IO thread.
  • WorldDownloaderClient: wires chunk events, the keybind, the /wdl commands, and disconnect flush.

License

All rights reserved (source-available). See LICENSE. In short: the code is public to read, you may use the official builds and include them in modpacks (unmodified, with credit), but please do not re-upload the mod elsewhere or distribute modified versions without permission.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages