Immortal Locator (仙定)
一个客户端 Fabric 模组,允许你仅使用一只末影之眼来寻找要塞。
灵感来源于 Simple Stronghold Finder,修复了一些 bug 并使用 Kotlin 重写。
本模组名称的灵感来源于中国古代仙人指路的传说。
The name of this module is inspired by the ancient Chinese legend of a sage pointing the way.
功能
- 仅需一只末影之眼即可找到要塞。
- 兼容 Minecraft 1.21.11。
- 支持多语言(I18n)。
- 发现要塞时有炫酷的效果。
- 我们非常喜爱 Immortal Locator。(仙定仙定我们喜欢你)
概述
此工具利用 Java 版 Minecraft 中末影之眼的行为,通过投掷一次末影之眼高效地定位要塞。Minecraft 中的要塞围绕世界原点(X=0, Z=0)生成在多个圆环上。这些位置遵循特定模式,每个圆环有固定数量的要塞,并大致均匀分布在圆环周围。
要塞生成圆环

共有 8 个圆环,包含总共 128 个要塞。以下是要塞分布的详细情况:
| 圆环 |
要塞数量 |
距原点的距离(方块) |
| 1 |
3 |
1,280–2,816 |
| 2 |
6 |
4,352–5,888 |
| 3 |
10 |
7,424–8,960 |
| 4 |
15 |
10,496–12,032 |
| 5 |
21 |
13,568–15,104 |
| 6 |
28 |
16,640–18,176 |
| 7 |
36 |
19,712–21,248 |
| 8 |
9 |
22,784–24,320 |
要塞的关键属性
- 要塞在每个圆环内相对于原点呈等角度分布。
- 要塞不会部分生成在地面之上。如果任何部分会延伸到海平面以上,则会被空气替换。
- 偶尔,要塞会在海洋中生成,通常被地形覆盖。
工作原理
此实现使用简单的几何原理计算末影之眼轨迹与要塞圆环的交点。具体过程如下:
-
记录末影之眼的运动:
- 程序在末影之眼飞行期间捕获两个位置(
pos1 和 pos2)。这两个位置经过延迟记录,以确保正确追踪轨迹。
- 如果末影之眼严格沿单一轴移动(表示退化情况),则取消计算。
-
调整坐标:
- 为了简化计算,根据末影之眼沿哪个轴移动得更远,可能会交换坐标系(X 变为 Z,反之亦然)。这确保直线的斜率保持可控。
-
计算轨迹:
- 使用记录的两个点确定轨迹的斜率:
- 该斜率用于预测轨迹与 Minecraft 世界网格的交点位置。
-
查找圆环:
-
对齐 Minecraft 网格:
- 由于要塞对齐到 16x16 网格,计算出的坐标会四舍五入到最近的网格点。
-
评估准确性:
- 对于每个潜在的要塞位置,根据末影之眼轨迹与网格点对齐的程度计算准确度分数。较高的准确度表示存在要塞的可能性更高。
-
排序并显示结果:
- 程序按准确度对识别出的要塞位置进行排名。在游戏聊天中显示最好的 5 个候选项,内容包括:
- 主世界坐标(X, Z)
- 下界坐标(X/8, Z/8)
- 准确度分数
使用方法
- 装备一只末影之眼。
- 投掷末影之眼并等待聊天框中显示结果。
- 前往提供的坐标以定位要塞。
Immortal Locator (仙定)
A client-side fabric mod which allows you to find stronghold with only one Eye of Ender.
Inspired by Simple Stronghold Finder, fixed some bugs and rewritten in Kotlin.
The name of this module is inspired by the ancient Chinese legend of a sage pointing the way.
本模组名称灵感来源于中国古代仙人指路传说。
Features
- Find stronghold with only one Eye of Ender.
- Minecraft 1.21.11 compatible.
- I18n supported.
- A fancy effect when found a stronghold.
- We love immortal locator so much. (仙定仙定我们喜欢你)
Overview
This tool leverages the behavior of the Eye of Ender in Minecraft Java Edition to locate strongholds efficiently with only one throw of the Eye of Ender. Strongholds in Minecraft generate in rings around the world origin (X=0, Z=0). The locations follow a specific pattern, with a fixed number of strongholds per ring and distributed roughly evenly around the ring.
Stronghold Generation Rings

There are 8 rings containing a total of 128 strongholds. Below is a breakdown of the stronghold distribution:
| Ring |
Number of Strongholds |
Distance from Origin (blocks) |
| 1 |
3 |
1,280–2,816 |
| 2 |
6 |
4,352–5,888 |
| 3 |
10 |
7,424–8,960 |
| 4 |
15 |
10,496–12,032 |
| 5 |
21 |
13,568–15,104 |
| 6 |
28 |
16,640–18,176 |
| 7 |
36 |
19,712–21,248 |
| 8 |
9 |
22,784–24,320 |
Key Stronghold Properties
- Strongholds are placed at equal angles from the origin within each ring.
- Strongholds do not generate partially above ground. If any part would extend above sea level, it is replaced with air.
- Occasionally, strongholds generate in oceans, usually covered by terrain.
How It Works
This implementation calculates the intersection of the Eye of Ender’s trajectory with the stronghold rings using simple geometric principles. Here is how the process works:
-
Recording Eye Movement:
- The program captures two positions (
pos1 and pos2) of the Eye of Ender during its flight. These positions are recorded with a delay to ensure that the trajectory is properly traced.
- If the Eye travels strictly along one axis (indicating a degenerate case), the calculation is aborted.
-
Adjusting Coordinates:
- To simplify calculations, the coordinate system may be swapped (X becomes Z, and vice versa) depending on which axis the Eye traveled farther along. This ensures the slope of the line remains manageable.
-
Calculating the Trajectory:
- Using the two recorded points, the slope of the trajectory is determined:
- This slope is used to predict where the trajectory intersects with the Minecraft world grid.
-
Finding the Ring:
-
The tool calculates the radial distance of each potential intersection point from the origin
-
It checks whether the distance falls within one of the predefined stronghold rings. The distance ranges for each ring are carefully defined.
-
Aligning to Minecraft Grid:
- Since strongholds are aligned to a 16x16 grid, the calculated coordinates are snapped to the nearest grid point
-
Evaluating Accuracy:
- For each potential stronghold location, an accuracy score is calculated based on how closely the Eye’s trajectory aligns with the grid point. Higher accuracy indicates a higher likelihood of a stronghold being present.
-
Sorting and Displaying Results:
- The program ranks the identified stronghold locations by accuracy. Up to 5 of the best candidates are displayed in the in-game chat, showing:
- Overworld coordinates (X, Z)
- Nether coordinates (X/8, Z/8)
- Accuracy score
Usage
- Equip an Eye of Ender.
- Throw the Eye and wait for the results to appear in the chat.
- Travel to the provided coordinates to locate the stronghold.
评论 0
登录后参与评分
还没有评论,来抢沙发吧