BlueMap 指示牌标记
概述
一个用于 BlueMap 的 Fabric 插件,它会根据游戏内的告示牌显示标记。
安装
将其与 BlueMap 一起放入 mods 文件夹中。
仅适用于服务端。
使用方法
在告示牌或悬挂式告示牌的正反两面写上以下文字:
[poi]
<简短描述>
地图上的对应位置将显示一个标记,并附带文字 <简短描述>。当告示牌被破坏时,该标记会从地图上移除。
请注意,前缀可以在配置文件中自定义设置。
配置
模组会在 config/bluemapsignmarkers 文件夹中创建一个 BMSM-Core.json 文件。该文件包含以下选项:
markerGroups- 标记组列表(详见下文);默认值为一个仅包含为[poi]前缀配置的标记组的列表。
标记组
标记组是一组可以在 BlueMap UI 中切换显示与隐藏的标记集合。每个标记组配置包含以下选项:
-
prefix- 告示牌必须包含的前缀,以便被纳入该标记组;必填; -
matchType- 在检查第一个非空告示牌文本行时使用的匹配类型;可选;默认为STARTS_WITH(区分大小写的精确前缀匹配);STARTS_WITH- 该行必须以之前缀开头;REGEX- 该行必须匹配正则表达式(使用 Java 正则引擎);
-
name- 标记组的名称;必填; -
type- 要显示的标记类型;可选;默认为POIPOI- 每个告示牌对应一个单点标记;LINE- 共享此组前缀且第一行标签相同的告示牌将成为一个线型标记的有序点(按放置时间排序);至少需要 2 个告示牌才能显示;SHAPE- 共享此组前缀且第一行标签相同的告示牌将成为一个填充多边形标记的有序点(按放置时间排序,高度取最高成员的高度);至少需要 3 个告示牌才能显示;EXTRUDE- 与SHAPE具有完全相同的成员归属模型(相同的前缀/标签分组,3+ 个告示牌,点按放置时间排序),但将多边形渲染为实体体积:底面取自最低成员的 Y 坐标,顶面取自最高成员的 Y 坐标(如果所有成员共享相同的 Y 坐标,则顶面会向上提升 1 个方块以避免零高度体积);
-
icon- 用于显示标记的图标路径或 URL;可选;默认为null(BlueMap 默认的 POI 图标);仅适用于POI -
offsetX- 标记的 X 轴偏移量;可选;默认为0(对应于 BlueMap 基础配置中的anchor.x);仅适用于POI -
offsetY- 标记的 Y 轴偏移量;可选;默认为0(对应于 BlueMap 基础配置中的anchor.y);仅适用于POI -
defaultHidden- 如果为 true,则该标记集默认隐藏,用户可手动启用;可选;默认为false -
minDistance- 显示标记的最小相机距离;可选;默认为0.0(浮点数,双精度) -
maxDistance- 显示标记的最大相机距离;可选;默认为10000000.0(浮点数,双精度) -
lineWidth- 线条/形状/挤出边框的像素宽度;可选;默认为2;仅适用于LINE/SHAPE/EXTRUDE -
lineColor- 线条/形状/挤出边框的十六进制颜色(含 Alpha 通道),例如#FF0000FF;可选;默认为#FF0000FF;仅适用于LINE/SHAPE/EXTRUDE -
fillColor- 形状或挤出体积内部的十六进制颜色(含透明度),例如#FF000033;可选;默认为#FF000033(半透明红色);仅适用于SHAPE/EXTRUDE -
sorting- 标记集在地图图层菜单中的排序顺序(数值越小越靠前);可选;默认为0 -
toggleable- 玩家是否可以完全隐藏/显示该标记集;可选;默认为true -
depthTest- 地形是否会遮挡标记(设置为false可使地下路径/区域透过地形可见);可选;默认为true;仅适用于LINE/SHAPE/EXTRUDE -
cssClasses- 添加到标记元素的 CSS 类列表,用于通过 BlueMap 的custom.css进行样式设置;可选;默认为空列表;仅适用于POI
在组类型不支持的字段上设置值(例如在 LINE/SHAPE/EXTRUDE 组上设置 icon,在 POI/LINE 组上设置 fillColor,在 POI 组上设置 depthTest,或在 LINE/SHAPE/EXTRUDE 组上设置 cssClasses)不会报错;模组会记录一条警告并忽略该字段。
示例
{
"markerGroups": [
{
"prefix": "[poi]",
"name": "Points of Interest"
},
{
"prefix": "[store]",
"name": "Stores",
"icon": "assets/store.png"
},
{
"prefix": "\\[[vV][iI][lL][lL][aA][gG][eE]\\]",
"matchType": "REGEX",
"name": "Villages"
},
{
"prefix": "[trail]",
"name": "Trails",
"type": "LINE",
"lineWidth": 3,
"lineColor": "#00A2FFFF"
},
{
"prefix": "[region]",
"name": "Regions",
"type": "SHAPE",
"lineWidth": 2,
"lineColor": "#FFA500FF",
"fillColor": "#FFA50040"
},
{
"prefix": "[building]",
"name": "Buildings",
"type": "EXTRUDE",
"lineWidth": 2,
"lineColor": "#4682B4FF",
"fillColor": "#4682B440"
}
]
}
此示例配置创建了 6 个标记组:一个用于 [poi] 标识牌,一个用于 [store] 标识牌,一个用于前缀通过正则表达式匹配村庄的标识牌(例如 [Village] 或 [VILLAGE]),一个用于 [trail] 标识牌,一个用于 [region] 标识牌,以及一个用于 [building] 标识牌。
故障排除
- 编辑标记组的名称前缀(尤其是
REGEX类型的前缀)会导致已有的告示牌出现孤立问题。 在运行此修复版本之前的服务器上,更改组的名称前缀文本后,执行/bluemap reload命令会使已放置的告示牌从地图上消失,且它们不会自行恢复。重新编辑告示牌的文本(即使重新输入相同的文本)或重启服务器即可解决此问题。在本修复版本中创建或重新编辑的告示牌在执行/bluemap reload时会自动自我修复——此后无需手动干预。 - 如果地图的
render-mask(渲染掩码)排除了某些标记,则这些标记将隐藏不显示。 只有当告示牌的位置位于特定 BlueMap 地图自身的render-mask范围内时(该范围在config/bluemap/maps/<id>.conf中配置),其对应的标记才会在该地图上显示出来——例如,一张设置了min-y: 127的下界屋顶地图,将不会显示 y=127 以下位置放置的告示牌的标记。没有设置render-mask的地图不受影响。升级到包含此修复的版本后,请执行一次/bluemap reload,以清除那些原本因超出渲染边界而错误显示在地图上的标记——仅重启服务器本身不会触发此清理过程。
BlueMap Sign Markers
Overview
Fabric plugin for BlueMap that displays markers based on in-game signs
Installation
Place in your mods folder along with BlueMap.
Server-side only.
Usage
Place a sign or hanging sign with the following text on either the front or back:
[poi]
<short description>
A marker will be displayed on the map at the location of the sign with the text <short description>. The marker will
be removed from the map when the sign is broken.
Note that the prefixes can be configured in the configuration file.
Configuration
The mod will create a BMSM-Core.json file in the config/bluemapsignmarkers folder. This file contains the following
options:
markerGroups- a list of marker groups (described in detail below); default is a list with a single marker group configured for the[poi]prefix.
Marker Groups
A marker group is a collection of markers that can be toggled on and off in the BlueMap UI. Each marker group configuration contains the following options:
prefix- prefix that the sign must contain to be included in the marker group; required;matchType- the type of match to use when checking the first non-empty sign text line; optional; default isSTARTS_WITH(case-sensitive exact match);STARTS_WITH- line must start with the prefix;REGEX- line must match the regular expression (uses Java regex engine);
name- the name of the marker group; required;type- the type of marker to display; optional; default isPOIPOI- a single point marker per sign;LINE- signs sharing this group's prefix and the same first-line label become ordered points of one line marker (points ordered by placement time); requires at least 2 signs to appear;SHAPE- signs sharing this group's prefix and the same first-line label become ordered points of one filled polygon marker (points ordered by placement time, height taken from the tallest member); requires at least 3 signs to appear;EXTRUDE- sharesSHAPE's exact membership model (same prefix/label grouping, 3+ signs, points ordered by placement time), but renders the polygon extruded as a solid volume: the floor is taken from the lowest member's Y, the ceiling from the tallest member's Y (if all members share the same Y, the ceiling is bumped up by 1 block to avoid a zero-height volume);
icon- the icon path or URL to display for the marker; optional; default isnull(BlueMap default POI icon);POIonlyoffsetX- the x offset of the marker; optional; default is0(corresponds withanchor.xin BlueMap base configuration);POIonlyoffsetY- the y offset of the marker; optional; default is0(corresponds withanchor.yin BlueMap base configuration);POIonlydefaultHidden- If this is true, the marker-set will be hidden by default and can be enabled by the user; optional; default isfalseminDistance- the minimum distance from the camera at which the marker will be displayed; optional; default is0.0(floating point, double precision)maxDistance- the maximum distance from the camera at which the marker will be displayed; optional; default is10000000.0(floating point, double precision)lineWidth- the width in pixels of the line/shape/extrude border; optional; default is2;LINE/SHAPE/EXTRUDEonlylineColor- the hex color (with alpha) of the line/shape/extrude border, e.g.#FF0000FF; optional; default is#FF0000FF;LINE/SHAPE/EXTRUDEonlyfillColor- the hex color (with alpha) of a shape's or extrude volume's interior, e.g.#FF000033; optional; default is#FF000033(translucent red);SHAPE/EXTRUDEonlysorting- the marker-set's order in the map's layer menu (lower sorts first); optional; default is0toggleable- whether the marker-set can be hidden/shown by a player at all; optional; default istruedepthTest- whether terrain can occlude the marker (setfalseto keep an underground trail/region visible through terrain); optional; default istrue;LINE/SHAPE/EXTRUDEonlycssClasses- a list of CSS classes added to the marker element, for styling via BlueMap'scustom.css; optional; default is an empty list;POIonly
Setting a field on a group type it doesn't apply to (e.g. icon on a LINE/SHAPE/EXTRUDE group, fillColor on a
POI/LINE group, depthTest on a POI group, or cssClasses on a LINE/SHAPE/EXTRUDE group) is not an error;
the mod logs a warning and ignores the field.
Examples
{
"markerGroups": [
{
"prefix": "[poi]",
"name": "Points of Interest"
},
{
"prefix": "[store]",
"name": "Stores",
"icon": "assets/store.png"
},
{
"prefix": "\\[[vV][iI][lL][lL][aA][gG][eE]\\]",
"matchType": "REGEX",
"name": "Villages"
},
{
"prefix": "[trail]",
"name": "Trails",
"type": "LINE",
"lineWidth": 3,
"lineColor": "#00A2FFFF"
},
{
"prefix": "[region]",
"name": "Regions",
"type": "SHAPE",
"lineWidth": 2,
"lineColor": "#FFA500FF",
"fillColor": "#FFA50040"
},
{
"prefix": "[building]",
"name": "Buildings",
"type": "EXTRUDE",
"lineWidth": 2,
"lineColor": "#4682B4FF",
"fillColor": "#4682B440"
}
]
}
This example configuration creates 6 marker groups: one for [poi] signs, one for [store] signs, one for signs
where the prefix is a regex match for villages (e.g. [Village] or [VILLAGE]), one for [trail] signs, one for
[region] signs, and one for [building] signs.
Troubleshooting
- Editing a marker group's prefix (especially a
REGEXprefix) orphans existing signs. On servers running a version before this fix, changing a group's prefix text can make already-placed signs vanish from the map after/bluemap reload, and they won't come back on their own. Re-edit the sign's text (even re-typing the same text) or restart the server to fix it. Signs created or re-edited on a version that ships this fix self-heal automatically on/bluemap reload- no manual fix needed going forward. - Markers are hidden on maps whose
render-maskexcludes them. A sign's marker only shows up on a given BlueMap map if the sign's position is inside that map's ownrender-mask(configured inconfig/bluemap/maps/<id>.conf) - e.g. a nether-roof map withmin-y: 127won't show markers for signs placed below y=127. A map with norender-maskis unaffected. After upgrading to a version with this fix, run/bluemap reloadonce to sweep away any markers that were already showing on a map outside its render bounds - a plain server restart alone does not trigger this sweep.
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
下载 BlueMap Sign Markers
发布说明和更新日志:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧