地图模板

基本信息

属性 值
位置 src/main/resources/templates/
文件数 21(3 个维度 × 7 个分辨率档)
格式 YAML,版本字段 version: 1.9
默认档位 hires(configuration.txt:16 deftemplatesuffix: hires)
模板实现类 org.dynmap.hdmap.HDMap(模板内 maps: 列表的 class:)

维度与档位

维度 文件名前缀 对应 MC 维度
Normal normal-*.txt 主世界 / 多数维度
Nether nether-*.txt 下界
The End the_end-*.txt 末地

每维度 7 个分辨率档:

档位 每像素方块数 说明(取自 configuration.txt:3-15 注释)
vlowres 2 ppb 超低分辨率
lowres 4 ppb 低分辨率
hires 16 ppb 高分辨率(初始 fullrender 极慢)
low_boost_hi 4 ppb + 局部升 16 ppb 低分辨率 + 选择性提升
hi_boost_vhi 16 ppb + 局部升 32 ppb 高分辨率 + 提升
hi_boost_xhi 16 ppb + 局部升 64 ppb 高分辨率 + 提升
(无后缀) — 默认模板

模板结构

以 templates/normal.txt 为例,templates: 下每个维度名(如 normal:)是一个模板,模板内含 maps: 列表,每项定义一张地图:

键 含义(normal.txt 实例)
class org.dynmap.hdmap.HDMap
name flat / surface / cave
title 网页显示标题 "Flat" / "Surface" / "Cave"
prefix 图块文件名前缀 flat / t / ct
perspective 引用透视 id,如 iso_S_90_vlowres / iso_SE_60_vlowres
shader 引用着色器 id,如 defaultscheme / cave
lighting 引用光照 id,如 default
mapzoomin 额外放大层数,normal.txt 中为 2

模板级键 extrazoomout: 2(normal.txt:12)控制额外缩小层数,每层尺寸翻倍。center:(normal.txt:13-16,整段注释状态)可指定地图中心。

normal.txt:5 的注释提示升级时该文件"MAY need to be replaced",如需自定义应重命名为 custom-normal-vlowres.txt。

数值

数值名 值
模板文件数 21
维度模板数 3(normal / nether / the_end)
每维度档位数 7
normal.txt 中定义的地图数 3(flat、surface、cave)
extrazoomout 2(normal.txt:12)
mapzoomin 2(normal.txt 三张地图均为 2)

交互

触发 行为
世界加载 按维度类型套用对应模板的 extrazoomout 与 maps
/dmap maplist 列出已生效的地图
/dmap mapadd 追加模板之外的自定义地图(需先 /dynmap pause all)
/dmap worldreset 重置回模板默认

仓库 README.md 提示默认已有 flat、surface、cave 三张地图,与 normal.txt 一致。

相关条目