区域发现
当玩家首次进入新的区域时,会显示一条发现通知——这是开放世界游戏用来让地图显得值得探索的那种时刻。
走进一座远古城市,它会自我宣告。踏入一个你从未见过的生物群系。穿过一个下界传送门。每个场景只会出现一次,之后便不再重复。
工作原理
所有逻辑均在服务端运行。通知以普通的原版标题数据包形式发送,因此不涉及自定义网络通信。
- 单人游戏 — 有效
- 专用服务器 — 有效,即使未安装该模组的玩家也能收到通知
- 仅客户端、原版服务器 — 无任何效果
对于整合包作者:同一个 jar 文件可同时放入客户端和服务端整合包中。
显示内容
| 类型 |
示例 |
| 维度 |
The Nether |
| 结构 |
Ancient City, Woodland Mansion |
| 生物群系 |
Cherry Grove, Deep Dark |
同一时间最多显示一条通知。如果你在一个新生物群系内进入了地牢,它们会依次出现,而不是叠加在一起。
生物群系的名称来自原版的翻译键,因此无需额外配置即可正确显示模组添加的生物群系名称。结构体的名称默认使用其 ID 的可读形式(例如 abandoned_temple 变为 Abandoned Temple),并且可以通过资源包进行覆盖。
进度存储
发现记录按玩家 UUID 存储在世界存档中。重启后数据依然存在,且与客户端无关。
命令
| 命令 |
权限等级 |
/regiondiscovery list [player] |
查看自己的列表无需权限,查看他人需等级 2 |
/regiondiscovery count [player] |
同上 |
/regiondiscovery reset [player] |
等级 2 |
/regiondiscovery resetall |
等级 4 |
/regiondiscovery reload |
等级 2 |
简写命令:/rd
配置
config/region_discovery.json
checkIntervalTicks — 检查每个玩家的间隔 tick 数,20 = 每秒一次
repeatAnnounce — 重新进入时也再次公告,而不仅仅是首次进入时
structuresRequireInside — 要求玩家实际站在结构体内部,而非仅在其边界框内。适用于生成极大结构体的模组
ignoredBiomes / ignoredStructures / ignoredDimensions — 支持 namespace:* 通配符。默认排除河流、海滩和石质海岸,以避免沿海移动时频繁刷屏
- 标题颜色、淡入淡出时间以及通知音效均可调整
性能
默认情况下每秒检查一次玩家,并通过错开 tick 来避免所有玩家同时进行检查。结构检测仅测试当前区块实际引用的候选结构体,因此即使安装了数十个结构体模组,性能开销依然很低。
依赖
- Fabric Loader
- Fabric API
- Java 21
Region Discovery
Adds a discovery notification when a player enters a new region for the
first time — the kind of moment open-world games use to make a map feel
worth exploring.
Walk into an Ancient City and it announces itself. Cross into a biome you
have never seen. Step through a Nether portal. Each one shows once, then
never again.
How it works
Everything runs server-side. Notifications are sent as ordinary
vanilla title packets, so there is no custom networking involved.
- Singleplayer — works
- Dedicated server — works, including for players who do not have the mod
- Client only, vanilla server — nothing happens
For modpack authors: the same jar goes in both the client and server pack.
What gets announced
| Type |
Example |
| Dimension |
The Nether |
| Structure |
Ancient City, Woodland Mansion |
| Biome |
Cherry Grove, Deep Dark |
At most one notification is shown at a time. If you enter a dungeon inside
a new biome, they arrive one after the other instead of stacking.
Biome names come from vanilla translation keys, so modded biomes are named
correctly without any extra work. Structures fall back to a readable form
of their ID (abandoned_temple becomes Abandoned Temple), and can be
overridden with a resource pack.
Progress
Discoveries are stored per player UUID in the world save. They survive
restarts and are independent of the client.
Commands
| Command |
Permission |
/regiondiscovery list [player] |
own list free, others level 2 |
/regiondiscovery count [player] |
same |
/regiondiscovery reset [player] |
level 2 |
/regiondiscovery resetall |
level 4 |
/regiondiscovery reload |
level 2 |
Short form: /rd
Configuration
config/region_discovery.json
checkIntervalTicks — how often each player is checked, 20 = once per second
repeatAnnounce — announce again when re-entering, not just the first time
structuresRequireInside — require standing inside an actual piece rather
than the structure bounding box. Useful with mods that generate very large
structures
ignoredBiomes / ignoredStructures / ignoredDimensions — supports
namespace:* wildcards. Rivers, beaches and stony shores are excluded by
default so coastal travel does not spam
- Title colour, fade timings, and the notification sound are all adjustable
Performance
Players are checked once per second by default, staggered across ticks so
they never all check at once. Structure detection only tests candidates the
current chunk actually references, which keeps the cost low even with dozens
of structure mods installed.
Requirements
- Fabric Loader
- Fabric API
- Java 21
评论 0
登录后参与评分
还没有评论,来抢沙发吧