dynmap/configuration.txt
基本信息
| 属性 | 值 |
|---|---|
| 仓库内模板 | src/main/resources/configuration.txt(471 行,其中非注释非空行 154) |
| 运行时路径 | <MC 根目录>/dynmap/configuration.txt |
| 格式 | YAML |
| 解析类 | org.dynmap.ConfigurationNode(org/dynmap/ConfigurationNode.java) |
| 顶层段 | storage、components |
仓库 README.md 明确分工:本文件"contains most performance and web page settings",而 config/GTNH-Web-Map.cfg “mostly contains various settings related to cross mod interactions”。
功能
上游 Dynmap 的主配置面,控制渲染节流、网页服务器、聊天、存储后端与组件装配。
组件以 components: 列表装配,每个条目一个 class:。仓库内默认启用的关键组件:
| 组件类 | 位置 | 作用 |
|---|---|---|
org.dynmap.ClientConfigurationComponent |
configuration.txt:38 |
向网页端下发配置 |
org.dynmap.InternalClientUpdateComponent |
configuration.txt:40 |
玩家位置/生命值/聊天的实时推送 |
org.dynmap.SimpleWebChatComponent |
见 README.md “Chat settings” 节的示例片段 |
网页端聊天 |
存储后端在 configuration.txt:22 的 storage: 段选择,仓库内默认 type: filetree(:24),另备 sqlite / mysql(均以 # 注释,:26-35)。
数值
渲染性能
| 键 | 仓库默认值 | 源码行 |
|---|---|---|
renderinterval |
1 |
configuration.txt:220 |
renderaccelerateinterval |
0.2 |
configuration.txt:226 |
tiles-rendered-at-once |
2 |
configuration.txt:229 |
parallelrendercnt |
#parallelrendercnt: 4(默认注释掉) |
configuration.txt:361 |
maxchunkspertick |
200 |
configuration.txt:353 |
tileupdatedelay |
30 |
configuration.txt:251 |
zoomoutperiod |
30 |
configuration.txt:243 |
fullrender-min-tps |
18.0 |
configuration.txt:375 |
progressloginterval |
100 |
configuration.txt:356 |
这些正是仓库 README.md “Performance settings” 一节推荐调优的键,其建议值(renderinterval ≤ 0.2、renderaccelerateinterval 0.05–0.01、tiles-rendered-at-once 取核心数 75–85%、maxchunkspertick 500、tileupdatedelay 5–1、zoomoutperiod 1、fullrender-min-tps 5)均严于仓库默认值。
网页与聊天
| 键 | 仓库默认值 | 源码行 |
|---|---|---|
webserver-port |
8123 |
configuration.txt:333 |
#webpage-title |
"My Awesome Server Map"(默认注释掉) |
configuration.txt:317 |
deftemplatesuffix |
hires |
configuration.txt:16 |
allowwebchat |
true |
configuration.txt:43 |
allowchat |
true |
configuration.txt:99 |
messagettl |
5 |
configuration.txt:138 |
webchat-interval |
5 |
configuration.txt:44 |
hidewebchatip |
false |
configuration.txt:45 |
trustclientname |
false |
configuration.txt:46 |
includehiddenplayers |
false |
configuration.txt:47 |
sendhealth |
true |
configuration.txt:41 |
sendposition |
true |
configuration.txt:42 |
login-enabled |
false |
configuration.txt:345 |
login-required |
false |
configuration.txt:347 |
#webpage-title 的实际默认值由仓库 README.md “Other tips” 节说明为 "$world - $map - GTNH-Web-Map",其中 $world 替换为维度名、$map 替换为地图名。
交互
| 触发 | 行为 |
|---|---|
allowwebchat: false |
禁止网页端发消息(仓库 README.md 提示默认端口 8123 容易被机器人刷屏) |
allowchat: false |
网页端看不到游戏内聊天 |
login-enabled: true |
启用登录 Servlet(DynmapCore.java:966-969 的 authmgr != null 分支) |
| 完全关闭聊天 | 需同时 allowwebchat: false 并注释掉 SimpleWebChatComponent 与 ClientComponent 的 chat 相关条目(仓库 README.md “Chat settings” 节给出完整片段) |
相关条目
- Web 服务器 -
webserver-port的消费方 - HTTP 接口 -
login-enabled控制其是否挂载 - config/GTNH-Web-Map.cfg - 本 fork 新增的跨 mod 配置
- UseForcedChunks - 另一份 Forge 标准配置