一个用 Rust 写的 Minecraft 存档编辑器。直接在存档文件层面编辑世界, 不依赖游戏运行,支持 1.21.1 到 26.4 快照。
A Minecraft save editor written in Rust. Edits the world at the save-file level without needing the game running. Supports 1.21.1 through 26.4 snapshots. Jump to English
中文 | English
- 直接从
.mca区块文件渲染世界地图,不需要启动游戏 - 支持主世界 / 下界 / 末地,可随时切换(切换不会丢失已加载的数据)
- 按"上方紧邻空气的非空气方块"判定地表,能正确处理洞穴、树叶、 下界顶盖等特殊情况
- 区块网格、跳转到坐标、回到玩家 / 出生点、全图视野
- 状态栏实时显示鼠标处的 坐标 / 区块 / 群系(中文名)
- 框选任意区域,删除区块
- 多位置选择:勾选后可累积多个选区,统一删除或批量导出
- 反选:把当前选区在可视范围内的补集设为新选区;屏幕外的部分不参与, 再点一次即可反回原状
- 复制 / 粘贴区块(含方块实体与实体)
- 查看每个区块内的实体类型分布,可只清空某个区块的实体
- 世界名、种子、游戏模式、难度、作弊、硬核
- 出生点、玩家坐标
- 游戏规则(58 条,中文名)
| 格式 | 说明 |
|---|---|
.litematic |
Litematica 结构文件(只存非空气方块) |
.smclip |
SwiftMap 剪贴板格式(完整快照,含空气/群系/实体,最多 7×7 区块) |
.html |
全图网页:整个维度渲染成一张图,浏览器里缩放查看,鼠标显示坐标与群系 |
多选区导出时自动追加 _1、_2、_3 序号。
为什么全图要导出成网页而不是在程序里看:实测 26.3 存档主世界有 82419 个区块, 全图缩放下每区块不足 1 像素,而且每次拖动都要重新排队上万个区块。 导出成 HTML 后由浏览器负责缩放,流畅得多,而且可以把文件发给别人或留档。 导出的网页是单个自包含文件(贴图以 base64 内嵌),不依赖本程序。
网页里可以用右键拖动平移、Ctrl+滚轮 缩放,勾选「区块网格」显示区块边界,
鼠标移上去会显示该处的方块坐标、区块坐标与群系。
导出会优先复用缩略图缓存。实测同一个存档(2601 区块):
| 耗时 | |
|---|---|
| 无缓存 | 15.1 秒 |
| 有缓存 | 0.71 秒 |
输出图片的 SHA256 完全一致,说明复用缓存不影响画质。 对于八万区块的大存档,差距会更明显。
存档区块数超过 2000 时,打开时会提示保存缩略图缓存。
- 缓存保存每个区块的 16×16 缩略图,以及各 region 文件的(大小、修改时间)
- 下次打开先读缓存,只重算 region 文件确实变过的部分
- 存放位置:
<程序目录>/地图缓存/<存档名>_<路径hash>/<维度>/ - 切片方式或存档 DataVersion 变了,整份缓存自动作废
实测 8 万区块的存档,第二次打开基本秒开。
- 每次写操作前自动备份,备份按时间戳命名,保留在
backups/目录 - 工具栏「撤销」一键还原上一次操作
- 删除 / 粘贴 / 改存档属性都是立即写盘 + 自动备份
- 检测
session.lock时区分"游戏真的在运行"和"文件只读权限", 不会误报占用
直接到 Releases 页面下载对应平台的版本, 不需要自己编译:
| 平台 | 文件 |
|---|---|
| Windows x64 | MinecraftSaveManager-windows-x64.exe |
| Linux x64 | MinecraftSaveManager-linux-x64 |
| macOS Intel | MinecraftSaveManager-macos-x64 |
| macOS Apple Silicon | MinecraftSaveManager-macos-arm64 |
Linux / macOS 下载后需要先给执行权限:
chmod +x MinecraftSaveManager-linux-x64
./MinecraftSaveManager-linux-x64- Rust 1.80 或更新
- 一个 C 链接器(任选其一):
- MSVC:装 Visual Studio Build Tools 的「使用 C++ 的桌面开发」
- MinGW:装 MSYS2 的 mingw-w64 工具链
git clone https://github.com/heiheids/mc-save-manager.git
cd mc-save-manager
cargo build --release产物在 target/release/mcworld-app.exe。
不想装 MSVC / MinGW 的话,可以用 rustup 自带的 rust-lld + gnullvm 目标。
参考 .cargo/config.local.toml.example,复制成 .cargo/config.toml 并改好路径,
然后:
cargo build --target x86_64-pc-windows-gnullvm.cargo/config.toml.example 里链接了 crates/app/assets/icon_obj.obj(含 .rsrc 节)。
COFF 对象里资源数据项的 OffsetToData 只能写节内偏移,链接后需要补成全局 RVA,
否则 Windows 读不到图标:
node .build/patch_rsrc_rva.js target/x86_64-pc-windows-gnullvm/debug/mcworld-app.exe --writebuild.cmd 已自动包含这一步。
crates/
core/ # 与 UI 无关的存档读写库
src/nbt.rs # NBT 编解码(Java Modified UTF-8,字节级往返)
src/anvil.rs # .mca 区域文件(4KiB 扇区、zlib/gzip/LZ4/none、外部 .mcc)
src/chunk.rs # 区块解析、方块调色板、高度图、地表采样
src/world.rs # level.dat(1.21.1 vs 26.x 双格式)、维度发现
src/edit.rs # 区块复制 / 粘贴 / 删除、实体过滤
src/safety.rs # 写入前备份、会话回滚
src/regions.rs # 已加载片区的连通性分簇
src/colors.rs # 方块地图配色(含 26.x 新方块)
src/swiftmap.rs # SwiftMap 小地图数据(.smr 只读)
src/smclip.rs # SwiftMap 剪贴板格式(.smclip 读写)
app/ # eframe/egui 桌面界面
src/main.rs # 应用状态、标签页、维度视图
src/panels.rs # 顶栏 / 工具栏 / 侧栏 / 状态栏 / 各类窗口
src/map_view.rs # 地图绘制、相机、选区交互
src/jobs.rs # 后台任务(扫描 / 采样 / 删除 / 导出)
src/lang.rs # 中文名查表(运行时读用户的 .minecraft)
src/theme.rs # 米色 / 橄榄绿配色
assets/ # 图标
docs/
开发说明.md # 详细的开发记录与踩坑笔记
折跃门(minecraft:end_gateway)是方块 + 方块实体,数据就存在区块里。
删除区块会连门一起删掉,而且无法恢复(除非再击杀一次末影龙)。
所以删除区块前会先扫描一次:如果选区内有折跃门,会弹出提示,列出具体哪些 区块不会被删除、门在什么坐标,并给出两个选择:
- 跳过并删除 —— 保留含折跃门的区块,只删除其余区块(默认)
- 强制全部删除 —— 连这些区块一起删,折跃门永久消失
折跃门只存在于末地,其它维度不做这项扫描,删除速度不受影响。
本程序是未签名的独立可执行文件,且下载量小,Windows Defender 等 基于信誉的引擎有时会误报。程序本身的行为是可以核对的:
- 不联网、不访问注册表、不创建开机自启项
- 不启动任何子进程
- 只读写你打开的那个存档目录,以及程序目录下的
地图缓存/
如果被拦截,可以:
- 核对 SHA256(每个 Release 页面都附了)
- 在 Defender 里对程序目录添加排除项
- 向微软提交误报:https://www.microsoft.com/wdsi/filesubmission
从 v1.0.3 起,exe 内嵌了完整的版本信息与应用程序清单(DPI 感知、
asInvoker 执行级别),外观上与常规 Windows 程序一致,有助于减少误判。
- 地图采样是全区扫描,大存档(上万区块)首次加载需要十几秒
- 地图走的是存档扫描,暂未使用 SwiftMap 的瓦片数据加速
- 结构文件
.litematic/.schem目前只能导出,导入未实现 - 加密存档(
session.lock被游戏独占)只能只读浏览 - 只在 Windows 上测试过
方块 / 群系 / 实体 / 物品的中文名来自 Minecraft 官方语言文件,
版权归 Mojang / Microsoft 所有。本项目不附带该文件,
而是在运行时从你自己安装的 .minecraft/assets/ 目录读取。
找不到时(例如装了但从未启动过游戏)会退回显示英文注册名,程序不会崩溃。
GPL-3.0 © 黑山大叔
本项目与 Mojang Studios / Microsoft 无关,Minecraft 是其注册商标。
中文 | English
A Minecraft save editor written in Rust. It edits the world directly at the save-file level — no need for the game to be running. Supports 1.21.1 through 26.4 snapshots.
- Renders the world map straight from
.mcaregion files — the game does not need to be running - Overworld / Nether / End, switchable at any time (switching never discards already-loaded data)
- Surface detection uses "the topmost non-air block that has air directly above it", so caves, tree canopies and the Nether ceiling are handled correctly
- Chunk grid overlay, jump-to-coordinates, go-to-player / go-to-spawn, fit-all
- Status bar shows the cursor's coordinates / chunk / biome in real time
- Drag-select any rectangle and delete those chunks
- Multi-location selection: tick the box, accumulate several regions, then delete them all or export them in one go
- Copy / paste chunks, including block entities and entities
- Per-chunk entity type breakdown; clear entities from a single chunk
- Level name, seed, game mode, difficulty, cheats, hardcore
- Spawn point and player position
- Game rules (58 of them, with readable names)
| Format | Notes |
|---|---|
.litematic |
Litematica schematic (stores non-air blocks only) |
.smclip |
SwiftMap clipboard format (full snapshot incl. air / biomes / entities, max 7×7 chunks) |
.html |
Full-map web page: renders an entire dimension into one image; zoom in the browser, hover for coordinates and biome |
With multiple selections, _1, _2, _3 suffixes are appended automatically.
Why export the full map to HTML instead of viewing it in-app: a real 26.3 save had 82,419 chunks in the Overworld. At full-map zoom each chunk is under one pixel, and every pan re-queues tens of thousands of chunks. Exporting to HTML lets the browser handle zooming, which is far smoother — and the file can be shared or archived. The output is a single self-contained file (textures embedded as base64) that does not require this program.
In the page you can pan with the right mouse button, zoom with Ctrl+wheel,
toggle a chunk grid overlay, and hover to read the block coordinates, chunk
coordinates and biome under the cursor.
Export reuses the thumbnail cache when available. Measured on one save (2601 chunks):
| Time | |
|---|---|
| No cache | 15.1 s |
| With cache | 0.71 s |
The embedded PNG is byte-identical (same SHA256), so reusing the cache costs nothing in output quality. The gap is much larger on an 80k-chunk save.
When a dimension has more than 8000 chunks, the program offers to save a thumbnail cache on open.
- The cache stores each chunk's 16×16 thumbnail plus each region file's (size, modification time)
- On the next open the cache is read first, and only region files that actually changed are re-sampled
- Location:
<exe dir>/地图缓存/<save name>_<path hash>/<dimension>/ - The cache is discarded automatically if the slice mode or the save's DataVersion changes
A save with 82k chunks opens almost instantly the second time.
- Automatic backup before every write, timestamped, kept in a
backups/folder next to the save - Toolbar Undo restores the previous operation in one click
- Delete / paste / property changes are written immediately, with automatic backup
session.lockdetection distinguishes "the game is really running" from "the file is just read-only", so it does not produce false lock reports
Grab a prebuilt binary from the Releases page — no need to build anything:
| Platform | File |
|---|---|
| Windows x64 | MinecraftSaveManager-windows-x64.exe |
| Linux x64 | MinecraftSaveManager-linux-x64 |
| macOS Intel | MinecraftSaveManager-macos-x64 |
| macOS Apple Silicon | MinecraftSaveManager-macos-arm64 |
On Linux / macOS you need to mark the file executable first:
chmod +x MinecraftSaveManager-linux-x64
./MinecraftSaveManager-linux-x64- Rust 1.80 or newer
- A C linker (pick one):
- MSVC: install Visual Studio Build Tools with "Desktop development with C++"
- MinGW: install the mingw-w64 toolchain from MSYS2
git clone https://github.com/heiheids/mc-save-manager.git
cd mc-save-manager
cargo build --releaseThe binary lands at target/release/mcworld-app.exe.
If you would rather not install MSVC or MinGW, you can use rustup's bundled
rust-lld with the gnullvm target. See .cargo/config.local.toml.example,
copy it to .cargo/config.toml and fix up the paths, then:
cargo build --target x86_64-pc-windows-gnullvmThe example config links crates/app/assets/icon_obj.obj (a COFF object with
a .rsrc section). Resource data entries inside a COFF object can only hold
section-relative offsets; after linking they must be turned into global RVAs,
otherwise Windows cannot read the icon:
node .build/patch_rsrc_rva.js target/x86_64-pc-windows-gnullvm/debug/mcworld-app.exe --writebuild.cmd already runs this step.
crates/
core/ # UI-independent save-file library
src/nbt.rs # NBT codec (Java Modified UTF-8, byte-exact round-trip)
src/anvil.rs # .mca region files (4KiB sectors, zlib/gzip/LZ4/none, external .mcc)
src/chunk.rs # Chunk parsing, block palette, heightmaps, surface sampling
src/world.rs # level.dat (dual format: 1.21.1 vs 26.x), dimension discovery
src/edit.rs # Chunk copy / paste / delete, entity filtering
src/safety.rs # Pre-write backup, session rollback
src/regions.rs # Connectivity clustering of loaded regions
src/colors.rs # Block map colours (including new 26.x blocks)
src/swiftmap.rs # SwiftMap minimap data (.smr, read-only)
src/smclip.rs # SwiftMap clipboard format (.smclip, read/write)
app/ # eframe/egui desktop UI
src/main.rs # App state, tabs, per-dimension views
src/panels.rs # Top bar / toolbar / sidebar / status bar / windows
src/map_view.rs # Map rendering, camera, selection interaction
src/jobs.rs # Background tasks (scan / sample / delete / export)
src/lang.rs # Localised names (reads the user's .minecraft at runtime)
src/theme.rs # Cream / olive colour scheme
assets/ # Icons
docs/
开发说明.md # Detailed development log and lessons learned (Chinese)
An end gateway (minecraft:end_gateway) is a block plus a block entity, and
the data lives inside the chunk. Deleting the chunk deletes the gateway with it,
and it cannot be recovered (short of killing the Ender Dragon again).
So before deleting chunks the program scans the selection. If it contains any gateways, a dialog lists exactly which chunks will not be deleted and where the gateways are, and offers two choices:
- Skip and delete — keep the gateway chunks, delete the rest (default)
- Force delete everything — delete those chunks too; the gateways are gone
Gateways only exist in the End, so other dimensions skip the scan entirely and deletion speed is unaffected.
This is an unsigned standalone executable with a low download count, so reputation-based engines such as Windows Defender occasionally flag it. The program's behaviour is easy to audit:
- No network access, no registry access, no autostart entries
- No child processes are spawned
- It only touches the save you open, plus
地图缓存/next to the executable
If it gets blocked you can:
- Verify the SHA256 (published with every release)
- Add an exclusion for the program folder in Defender
- Report the false positive: https://www.microsoft.com/wdsi/filesubmission
Since v1.0.3 the executable embeds full version information and an application
manifest (DPI awareness, asInvoker execution level), which makes it look like
an ordinary Windows application and helps reduce false positives.
- Map sampling is a full scan — large saves (tens of thousands of chunks) take 10–20 seconds on first load
- The map is built from a save scan; SwiftMap's tile data is not yet used to speed it up
.litematic/.schemfiles can be exported but not imported yet- Encrypted / locked saves can only be browsed read-only
- Only tested on Windows
Block / biome / entity / item names come from Minecraft's official language
file, copyright Mojang / Microsoft. This project does not bundle that
file; it reads it at runtime from your own .minecraft/assets/ directory.
When the file cannot be found (e.g. the game was installed but never launched), the program falls back to raw registry names and does not crash.
GPL-3.0 © 黑山大叔 (heishandashu)
This project is not affiliated with Mojang Studios or Microsoft. Minecraft is a trademark of Mojang Synergies AB.
