NbtMapper - 自动地图画构建器
免责声明: 本模组旨在用于地图画构建和创意项目。仅在服务器规则允许的情况下,在多人游戏服务器上使用该模组。
一个 Fabric 客户端模组,可帮助您从 NBT 结构文件构建地图画。加载您的结构、设置坐标,该模组将协助移动、物品栏管理、方块放置和补给。
要求
- Minecraft 1.21.11
- Fabric Loader 0.18.2+
- Fabric API
- Java 21+
- 拥有传送命令(例如
/home、/warp)的服务器,用于自动补给
安装
- 为 Minecraft 1.21.11 安装 Fabric Loader
- 下载并将模组
.jar 放入 mods/ 文件夹
- 确保 Fabric API 也位于
mods/ 文件夹中
- 启动游戏
快速开始
- 将您的
.nbt 结构文件放入 <game_dir>/nbtmapper/
- 在游戏中,按 Z 键打开 GUI
- 进入 Tasks 选项卡,点击 NBT 文件以加载它
- 在 Main 选项卡上,点击 New Site 以设置建造原点(自动吸附到 128 格地图网格)
- 在 Storage 选项卡中配置您的存储箱子(每种方块类型的箱子坐标)
- 在 Settings 选项卡中设置您的传送命令
- 点击 Start —— 模组将处理其余部分
功能
全自动建造
- 加载 NBT 结构并以优化的蛇形图案放置方块
- 在地毯/表面方块之前自动放置圆石基底
- 在范围内预填充附近相同类型的方块,以提高速度
- 跳过已经正确的方块
自动补给
- 检测当某种方块类型的物品栏不足时
- 使用服务器传送命令(例如
/home、/warp)前往您配置的存储区域
- 批量补给:单次行程获取多种方块类型
- 获取后合并物品栏中的拆分堆叠
自动下一张地图
- 当地图完成时,自动加载下一个 NBT 文件(按字母顺序)
- 沿 X 轴偏移建造原点,距离为上一张地图的宽度
- 非常适合并排构建多张地图画作品
- 通过主选项卡上的 Auto 按钮切换开启/关闭
会话持久化
- 进度每 10 秒自动保存
- 记住上次加载的文件、原点、设置和运行状态
- 如果建造处于活动状态,重启游戏后会自动恢复
安全功能
- 循环检测:如果陷入循环则自动暂停,20 秒后恢复
- 方块验证:检查先前放置的方块以确保正确性
- 卡住检测:如果在建造过程中玩家卡住,则重新定位玩家
- 对移动和放置尝试设置最大重试次数
- 移动期间的自动错误恢复
GUI 概览
按 Z 打开。GUI 有 4 个选项卡:
Main 选项卡
- 建造原点坐标(只读,通过 New Site 设置)
- 大型 Start/Pause 按钮
- 带手动设置/重置功能的进度显示
- Auto 开关(完成后自动加载下一张地图)
- Debug 开关(显示实时 HUD 叠加层)
Tasks 选项卡
- 列出
nbtmapper/ 文件夹中的所有 .nbt 文件
- 点击加载,X 删除
- 显示进度计数和已完成地图的
[done] 标记
- Open NBT Folder 按钮,方便快速访问
Storage 选项卡
- 将每种方块类型映射到箱子位置(X/Y/Z)
- 直接在 GUI 中编辑坐标
- 更改时自动保存
Settings 选项卡
- TP to Store:传送到存储区域的命令
- TP to Worksite:返回建造地点的命令
- Update Home:在补给运行前更新您家位置的命令
- Move Mode:Walk / Sprint / Creative Fly / Always Fly / Elytra
配置文件
所有配置文件都存储在 <game_dir>/nbtmapper/ 中:
| 文件 |
用途 |
storage.json |
方块到箱子的坐标映射和传送命令 |
settings.json |
原点、移动模式、自动下一张地图、上次加载的文件、运行状态 |
<name>_progress.json |
每张地图的建造进度 |
移动模式
| 模式 |
描述 |
| Walk |
标准地面移动 |
| Sprint |
冲刺地面移动 |
| Creative Fly |
创造模式飞行,到达后禁用 |
| Always Fly |
创造模式飞行,保持启用 |
| Elytra |
鞘翅飞行 |
工作原理
模组在每个客户端刻上运行状态机:
NEXT → EQUIPPING → MOVING → PLACING → NEXT → ...
↘ SUPPLYING (当方块不足时)
- NEXT: 找到下一个要放置的方块,批量跳过空气/已完成的方块
- EQUIPPING: 切换快捷栏到正确的方块
- MOVING: 导航到目标 4 格范围内
- PLACING: 放置方块并预填充附近相同类型的方块
- SUPPLYING: 传送到存储区,获取方块,返回
多个状态可以在单个刻内链接,以实现高效建造。
NBT 文件格式
模组读取标准的 Minecraft 结构 NBT 文件(.nbt)。这些文件可以通过以下方式创建:
模组读取 palette(方块类型)和 blocks(位置),仅保留每个 X/Z 列的最顶层方块。
重要提示
- 仅客户端:此模组完全在客户端运行,无需安装服务端。
- 服务器规则:使用前请确保您的服务器允许使用建筑辅助工具。
- 传送指令:补给系统依赖服务器提供的传送指令(例如 Essentials 的
/home、/warp)。请在“设置”选项卡中配置这些指令。
- 创造飞行:默认移动模式需要创造模式的飞行能力。如果在不具备飞行权限的情况下进行生存游戏,请切换为行走/奔跑模式。
- 备份:该模组会在世界中放置方块。请务必对重要建筑进行备份。
- 首次运行:首次启动时,会生成
storage.json 文件,其中包含默认的箱子坐标,但这些坐标可能与你的服务器不匹配。你必须在“存储”选项卡中配置自己的箱子位置。
按键绑定
| 按键 |
操作 |
| Z |
打开/关闭图形用户界面(打开时自动暂停) |
NbtMapper - Automatic Map Art Builder
Disclaimer: This mod is intended for map art building and creative projects. Use on multiplayer servers only if permitted by the server rules.
A Fabric client-side mod that helps you build map art from NBT structure files. Load your structure, set the coordinates, and the mod assists with movement, inventory management, block placement, and resupply.
Requirements
- Minecraft 1.21.11
- Fabric Loader 0.18.2+
- Fabric API
- Java 21+
- A server with teleport commands (e.g.,
/home, /warp) for auto-resupply
Installation
- Install Fabric Loader for Minecraft 1.21.11
- Download and place the mod
.jar into your mods/ folder
- Make sure Fabric API is also in the
mods/ folder
- Launch the game
Quick Start
- Place your
.nbt structure files into <game_dir>/nbtmapper/
- In-game, press Z to open the GUI
- Go to the Tasks tab, click an NBT file to load it
- On the Main tab, click New Site to set the build origin (auto-snaps to 128-block map grid)
- Configure your storage chests in the Storage tab (chest coordinates for each block type)
- Set your teleport commands in the Settings tab
- Click Start — the mod handles the rest
Features
Fully Automated Building
- Loads NBT structures and places blocks in an optimized snake pattern
- Automatically places cobblestone bases before carpet/surface blocks
- Prefills nearby same-type blocks while in range for extra speed
- Skips already-correct blocks instantly
Auto Resupply
- Detects when inventory is low on a block type
- Uses server teleport commands (e.g.,
/home, /warp) to travel to your configured storage area
- Batch supply: fetches multiple block types in a single trip
- Consolidates split stacks in inventory after fetching
Auto-Next Map
- When a map completes, automatically loads the next NBT file (alphabetical order)
- Offsets the build origin along X axis by the previous map's width
- Perfect for building multi-map art pieces side by side
- Toggle on/off via the Auto button on the Main tab
Session Persistence
- Progress is auto-saved every 10 seconds
- Remembers last loaded file, origin, settings, and running state
- Resumes automatically after game restart if building was active
Safety Features
- Loop detection: auto-pauses if stuck in a loop, resumes after 20 seconds
- Block verification: checks previously placed blocks to ensure correctness
- Stuck detection: repositions the player if they get stuck during building
- Max retry limits on movement and placement attempts
- Automatic error recovery during movement
GUI Overview
Press Z to open. The GUI has 4 tabs:
Main Tab
- Build origin coordinates (read-only, set via New Site)
- Large Start/Pause button
- Progress display with manual set/reset
- Auto toggle (auto-load next map on completion)
- Debug toggle (shows real-time HUD overlay)
Tasks Tab
- Lists all
.nbt files in the nbtmapper/ folder
- Click to load, X to delete
- Shows progress count and
[done] marker for completed maps
- Open NBT Folder button for quick access
Storage Tab
- Maps each block type to a chest location (X/Y/Z)
- Edit coordinates directly in the GUI
- Auto-saves on change
Settings Tab
- TP to Store: command to teleport to your storage area
- TP to Worksite: command to return to the build site
- Update Home: command to update your home position before supply runs
- Move Mode: Walk / Sprint / Creative Fly / Always Fly / Elytra
Configuration Files
All config files are stored in <game_dir>/nbtmapper/:
| File |
Purpose |
storage.json |
Block-to-chest coordinate mappings and teleport commands |
settings.json |
Origin, move mode, auto-next, last loaded file, running state |
<name>_progress.json |
Per-map build progress |
Movement Modes
| Mode |
Description |
| Walk |
Standard ground movement |
| Sprint |
Sprinting ground movement |
| Creative Fly |
Creative mode flight, disables on arrival |
| Always Fly |
Creative mode flight, stays enabled |
| Elytra |
Elytra-based flight |
How It Works
The mod runs a state machine on each client tick:
NEXT → EQUIPPING → MOVING → PLACING → NEXT → ...
↘ SUPPLYING (when low on blocks)
- NEXT: Finds the next block to place, skips air/completed blocks in bulk
- EQUIPPING: Switches hotbar to the correct block
- MOVING: Navigates to within 4 blocks of the target
- PLACING: Places the block and prefills nearby same-type blocks
- SUPPLYING: Teleports to storage, fetches blocks, returns
Multiple states can chain in a single tick for efficient building.
NBT File Format
The mod reads standard Minecraft structure NBT files (.nbt). These can be created with:
- Structure blocks in-game
- External tools like NBT Studio or Amulet Editor
- Map art generators that export to NBT format
- Recommended: Online map art generators such as MapartCraft can convert images to NBT files
The mod reads the palette (block types) and blocks (positions), keeping only the topmost block per X/Z column.
Important Notes
- Client-side only: This mod runs entirely on the client. No server-side installation needed.
- Server rules: Always ensure your server permits building assistance tools before use.
- Teleport commands: The resupply system relies on server-provided teleport commands (e.g., Essentials
/home, /warp). Configure these in the Settings tab.
- Creative fly: The default move mode requires creative flight ability. Switch to Walk/Sprint if playing in survival without fly permissions.
- Backup: The mod places blocks in the world. Always have backups of important builds.
- First run: On first launch,
storage.json is created with default chest coordinates that won't match your server. You must configure your own chest locations in the Storage tab.
Keybindings
| Key |
Action |
| Z |
Open/close GUI (auto-pauses when opening) |
评论 0
登录后参与评分
还没有评论,来抢沙发吧