找出距离最近的 N 个结构、生物群系或兴趣点(POI),而不仅仅是最近的一个。 精确的距离排序。服务器持续运行计时。
/locate structure minecraft:mansion 20
/locate biome minecraft:mushroom_fields 3
/locate poi #minecraft:village 5
原版 /locate 会阻塞服务器线程并仅返回一个结果,且该结果并不总是最近的。LocateMore 在原版命令基础上增加了可选的数量参数(1 到 100),并将原版自身的最近结构搜索路由到相同的引擎中,因此原版 /locate、末影之眼、探险家地图以及其他模组也能获得真正的最近结果,且不会阻塞任何一次游戏刻(tick)。结果按从近到远的顺序流式输出至聊天栏,点击每一行即可传送,同时顶部 Boss 栏显示进度。
为何速度快
原版采用向外螺旋的方式并重复检查重叠区域。LocateMore 从种子开始计算:种子决定了每个结构可能生成的唯一区块,引擎以真实的距离顺序遍历这些候选项,并使用与原版本相同的检查逻辑进行验证。未生成地形中的候选项通常可以通过纯数学方法确定(即使用与生成本身相同的生成点数学算法和加权集合抽取;每项候选项在获得信任前需经过裁判验证,若裁判在任何时候表示异议则撤销其资格),因此无需为它们加载或生成任何区块。结果与原版本一致;只是能更早地提供更多结果。
实测数据(发布构建版本,全新世界,种子 20260821,数量 20;warm 为相同搜索的再次执行):
| structure | cold | warm |
|---|---|---|
| mansion | 1.7 s | 0.06 s |
| ancient_city | 0.10 s | |
| monument | 1.5 s | |
| jungle_pyramid | 3.7 s | 0.10 s |
| #village (标签, 多集合) | 0.17 s | |
| fortress (下界, 多集合) | 0.04 s |
在同一世界中,原版需要 10 秒的阻塞刻来处理 20 个结果中的 13 个。每次发布前都会针对两个支持版本,将坐标逐一比对实际生成的结果(通过 test/run-both.sh 脚本)。
同样适用于生物群系和 POI
/locate biome 采样原版使用的相同网格,并通过相同的气候采样器,但在后台线程中以精确的距离顺序进行(原版的螺旋方式仅是近似最近)。N 个结果对应 N 个独立的区块:如果某次命中位于已接受命中的 biomeSeparationBlocks(默认 512)范围内,则会被抑制。默认半径为 12800,是原版的两倍,因为额外的范围纯粹是数学计算的结果。
/locate poi 搜索所有已探索的地形,而不是原版的 256 格半径,它在后台线程读取 POI 存储,并且不会像原版的查询那样将 POI 数据锁定在内存中。POI 属于世界状态,因此无法搜索未探索的地形;包含尚未写入磁盘的内存更改,并在打印前对实时内存重新检查命中情况。
供其他模组使用的 API
LocateMoreApi.findNearest(level, structures, origin, 5).thenAccept(result -> {
for (LocateMoreApi.StructureHit hit : result.hits()) {
// hit.pos(), hit.structure(), hit.distance()
}
});
com.rasmus.locatemore.api 是公共契约;其他所有包均为内部实现。请在服务器线程上调用;Future 将在该线程完成,结果按精确距离顺序排列,并提供 complete 和 orderingGuaranteed 标志用于处理预算限制和未解决的情况。SearchOptions 可降低每次调用的预算,关闭区块生成(mathOnly()),并排除之前的命中记录。
局限性
- 原版
/locate刻意返回真正的最近结果,这有时与原版本不符(MC-138887)。为了实现与原版本的完全兼容(速通练习、种子工具):请设置/gamerule locatemore:exact_locate false,此设置针对当前世界即时生效;config/locatemore.json中的improveVanillaLocate是全局禁用开关。 - 未生成地形中的多集合结构需要将其候选区块生成至第一阶段,这与原版 locate 的行为完全一致;每次探测会在存档中增加 4 到 12 KB 的数据,摘要报告会显示探测次数。单集合结构从不需要进行探测。
- 搜索状态不会跨会话持久保存;数据包重载会中止正在进行的搜索并清除会话缓存。标记是一个故意的例外:它们是玩家自身数据中的书签,绝不会作为搜索结果的输入。
- 默认限制:1,000,000 格半径,60 秒墙钟时间,50,000 次候选项检查,2 个并发搜索。部分结果会注明此情况。所有这些配置均位于
config/locatemore.json中。
命令
| command | 功能 |
|---|---|
/locate structure <id|#tag> <count> [min_distance] |
异步搜索,流式输出 N 个最近的结果(可选至少距离那么远) |
/locate biome <id|#tag> <count> [min_distance] |
异步生物群系搜索,N 个独立区块 |
/locate poi <id|#tag> <count> [min_distance] |
在所有已探索地形上进行异步 POI 搜索 |
/locate near structure|biome <a> structure|biome <b> [radius] |
寻找距离 a 最近且在半径内(默认 512)存在 b 的位置,例如沙漠旁的村庄(混合对中结构体排在前面) |
/locate mark <name> / /locate marks / /locate unmark <name> |
保存你站立的位置 / 列出你的标记 / 删除其中一个;每一行都包含与搜索结果相同的可点击坐标和按钮,死亡时自动标记为 death(配置中的 deathMark 可全局关闭此功能) |
/locate track <mark|x y z name> |
动作栏中实时显示距离 + 箭头,自动清除 |
/locate compass <mark|x y z name> |
指向该位置的命名指南针 |
/locate verify <structure> |
漂移陷阱线测试:在 20 个区块范围内对比影子解析与原版结果 |
/locate prune |
删除空区域文件(原版的扫描路径仍会留下它们,MC-311323) |
/gamerule locatemore:exact_locate |
针对原版调用点的逐世界切换开关 |
需要操作者权限,与原版 /locate 相同。所有子命令也存在于 /locatemore 下,该别名是权限模组(如 LuckPerms 等)可以逐个节点授予的:locatemore.track、locatemore.compass、locatemore.mark、locatemore.prune、locatemore.verify、locatemore.near(原版的 /locate 根命令在任何子命令被处理前要求操作者等级 2)。结构标签和所有维度均支持。专用服务器上的原版客户端能看到正确的输出,因为每一行都使用了原版翻译键。
版本
一个 jar 包同时适用于 26.1.2 和 26.2。Fabric 加载器,需要 Fabric API。MIT 许可证。 服务端:安装在服务器上时,原版客户端可获得全部功能;在单人游戏中,安装到客户端即可使用。
Find the N nearest structures, biomes or POIs instead of just the closest. Exact distance order. The server keeps ticking.
/locate structure minecraft:mansion 20
/locate biome minecraft:mushroom_fields 3
/locate poi #minecraft:village 5
Vanilla /locate blocks the server thread and returns one result, and that
result is not always the nearest.
LocateMore adds an optional count from 1 to 100 to the vanilla command and
routes vanilla's own nearest-structure search through the same engine, so
plain /locate, eyes of ender, explorer maps and other mods get the true
nearest too, without blocking a tick. Results stream into chat nearest
first, every line teleports on click, and a boss bar shows progress.
Why it is fast
Vanilla spirals outward and re-checks overlapping areas. LocateMore starts from the seed: the seed determines the only chunks where each structure can start, and the engine walks exactly those candidates in true distance order, verifying each with the same checks vanilla uses. Candidates in ungenerated terrain are usually settled by pure math (the same generation-point math and weighted set draw generation itself would run, each earned by a referee before it was trusted, and revoked for the session if a referee ever disagrees), so no chunks are loaded or generated for them. The results match vanilla; there are simply more of them, sooner.
Measured (release build, virgin world, seed 20260821, count 20; warm is the same search again):
| structure | cold | warm |
|---|---|---|
| mansion | 1.7 s | 0.06 s |
| ancient_city | 0.10 s | |
| monument | 1.5 s | |
| jungle_pyramid | 3.7 s | 0.10 s |
| #village (tag, multi-set) | 0.17 s | |
| fortress (Nether, multi-set) | 0.04 s |
Vanilla in the same world: 10 seconds of blocked ticks for 13 of 20. Every release is diffed coordinate-for-coordinate against real generation on both supported versions before it ships (test/run-both.sh).
Biomes and POIs too
/locate biome samples the same grid vanilla does, through the same
climate sampler, but off-thread and in exact distance order (vanilla's
spiral is only approximately nearest). N results are N distinct patches: a
hit within biomeSeparationBlocks (default 512) of an accepted one is
suppressed. Default radius 12800, double vanilla's, since the extra range
is pure math.
/locate poi searches ALL explored terrain instead of vanilla's 256-block
radius, reading the poi storage off-thread, and never pins poi data in
memory the way vanilla's query does. POIs are world state, so unexplored
terrain cannot be searched; in-memory changes not yet on disk are included,
and hits are re-checked against live memory before printing.
API for other mods
LocateMoreApi.findNearest(level, structures, origin, 5).thenAccept(result -> {
for (LocateMoreApi.StructureHit hit : result.hits()) {
// hit.pos(), hit.structure(), hit.distance()
}
});
com.rasmus.locatemore.api is the contract; every other package is
internal. Call on the server thread; the future completes there, hits in
exact distance order, with complete and orderingGuaranteed flags for
budget-cut and unresolved cases. SearchOptions lowers budgets per call,
turns off chunk generation (mathOnly()), and excludes previous hits.
Limitations
- Plain
/locatedeliberately returns the true nearest, which vanilla sometimes does not (MC-138887). For exact vanilla parity (speedrun practice, seed tooling):/gamerule locatemore:exact_locate false, per world, live;improveVanillaLocateinconfig/locatemore.jsonis the server-wide kill switch. - Multi-set structures in ungenerated terrain need their candidate chunk generated to the first stage, exactly like vanilla locate; each probe adds 4 to 12 KB to the save and the summary reports the count. Single-set structures never need probes.
- No search state persists between sessions; a datapack reload aborts running searches and clears the session memo. Marks are the deliberate exception: they are bookmarks in the player's own data, and never an input to a search result.
- Default bounds: 1,000,000 block radius, 60 s wall clock, 50,000 candidate
checks, 2 concurrent searches. Partial results say so. All of it lives in
config/locatemore.json.
Commands
| command | what |
|---|---|
/locate structure <id|#tag> <count> [min_distance] |
async search, streams the N nearest (optionally at least that far away) |
/locate biome <id|#tag> <count> [min_distance] |
async biome search, N distinct patches |
/locate poi <id|#tag> <count> [min_distance] |
async poi search over all explored terrain |
/locate near structure|biome <a> structure|biome <b> [radius] |
the nearest a with a b within radius (default 512), e.g. a village next to a desert (mixed pairs put the structure first) |
/locate mark <name> / /locate marks / /locate unmark <name> |
save the spot you stand on / list your marks / delete one; every line has the same clickable coordinates and buttons as search results, and dying auto-marks death (deathMark in the config turns that off server-wide) |
/locate track <mark|x y z name> |
live distance + arrow in the action bar, self-clearing |
/locate compass <mark|x y z name> |
named compass pointing at the spot |
/locate verify <structure> |
drift tripwire: shadow parse vs vanilla over 20 chunks |
/locate prune |
delete empty region files (vanilla's scan path still leaves them, MC-311323) |
/gamerule locatemore:exact_locate |
per-world toggle for the vanilla call sites |
Operator permission required, same as vanilla /locate. Every subcommand
also exists under /locatemore, and that alias is the one a permissions
mod (LuckPerms etc.) can grant node by node: locatemore.track,
locatemore.compass, locatemore.mark, locatemore.prune,
locatemore.verify, locatemore.near (vanilla's /locate root demands op
level 2 before any subcommand is consulted). Structure tags and all
dimensions work. Vanilla clients on a dedicated server see correct output, because
every line uses vanilla translation keys.
Versions
One jar runs on 26.1.2 and 26.2. Fabric, requires Fabric API. MIT license. Server-side: installed on a server, vanilla clients get everything; in singleplayer a client install works.
下载 LocateMore
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LocateMore
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 将 mc-26.3 合并到 main
- 添加仅用于开发的客户端游戏测试,并在发布工作流中构建两个 JAR 文件
- 将 fix-lush-caves-prefilter 合并到 mc-26.3
- 仅在证明目标无法获胜时才跳过生物群系列
- 以 LF 行结尾检出 shell 脚本
- 在 ClimateAccess 和 VersionCompat 之后移植到 Minecraft 26.3
- 搭建 26.3 变体版本,并在 26.1 JAR 中拒绝使用 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧