结构出生点
获得你一直梦寐以求的完美开局。
随意选择起点:女巫小屋、村庄、海底神殿,随你喜好。
该模组通过多种方式评估“完美结构”,最重要的是它会检查结构所在的生物群系,以及周围区域中符合你偏好的生物群系的占比。
此模组还支持在你的出生结构中自定义怪物生成,更多信息见下文。
工作原理
服务器启动时,它会查找配置的结构。搜索从坐标 (0,0) 开始并向外扩展。每个候选结构都会根据你对生物群系的偏好和地形要求进行评估。找到完美位置后,世界出生点将设置在此处,任何正在等待的玩家将被传送至此。后续加入的玩家在加入时也会被传送。
如果你的要求比较简单,搜索速度会很快,甚至可能在加载界面结束前就完成。如果你有非常严格的要求,搜索可能需要几分钟。在搜索过程中可能会出现明显的卡顿,但请放心,一旦搜索完成,就不会再有性能影响。
快速上手
- 将模组与 Fabric API 一起安装到你的 Fabric 1.21.1 整合包中。
- 首次启动游戏——模组会在
config/structure-spawn-point.json 生成默认配置文件。
- 将
target_structure(目标结构)设置为你希望玩家出生的结构。
- 启动服务器或加入世界。搜索会在每个新世界中自动运行,并在服务器启动或执行重置命令时读取配置,无需重启整个游戏即可更新配置。
想要在不同世界中拥有不同的开局?
对于特定世界的配置,请在 config/structure-spawn-point/<world-name>.json 创建文件。特定世界的配置优先级高于全局配置。
查找结构 ID
在游戏中使用 /locate structure 命令来查找结构 ID(例如 minecraft:village)。这就是你要填入 target_structure 的值。模组支持具体的结构 ID 和结构标签——只需输入任意一种格式,模组会自动尝试两者。命令中使用的 # 前缀不是必需的,但加上也不会出错。
"target_structure": "minecraft:village"
有效值示例:
nova_structures:stray_fort — 由模组添加的特定结构
minecraft:village_plains — 特定的原版村庄变体(仅限平原)
minecraft:village — 任何村庄变体,通过结构标签解析
结构定位配置
这些设置控制模组如何搜索和评估候选结构。
preferred_biomes (默认:forest, plains, meadow)
结构理想情况下应位于的生物群系。使用 namespace:biome_id 指定具体生物群系,或使用 namespace:biome_tag 指定类别。# 前缀是可选的。留空列表表示接受任何生物群系。
"preferred_biomes": ["minecraft:is_forest", "minecraft:plains", "minecraft:meadow"]
avoided_biomes (默认:badlands, beach, jungle, mountain, ocean, swamp)
要避免的生物群系。格式与 preferred_biomes 相同。
"avoided_biomes": ["minecraft:is_ocean", "minecraft:is_badlands"]
min_preferred_area_percentage (默认:60,范围:0–100)
结构周围区域(384×384 格)的最小质量分数。分数基于周围区域中属于偏好或中立生物群系的比例,其中偏好生物群系权重加倍,而避免生物群系会严重扣分。设置为 0 可跳过区域检查,仅考虑结构所在的即时生物群系。
terrain_flatness_check_radius (默认:48,范围:0–128)
检查结构周围地形平坦度的半径(以格为单位)。模组会测量此区域内最高和最低表面方块之间的高度差,并拒绝超过 max_terrain_height_difference 的候选项。设置为 0 可禁用地形检查。
max_terrain_height_difference (默认:16,范围:0–100)
地形检查半径内允许的最大高度差(以格为单位)。16 表示接受平缓的山丘;更低的值要求地面更平坦。
max_search_attempts (默认:10,范围:1–50)
在放弃并使用迄今为止找到的最佳结构之前,要评估多少个结构。每次尝试大约需要 1–4 秒,具体取决于结构类型。搜索从世界中心螺旋向外扩展,因此增加此值可以覆盖更大的区域。如果搜索始终耗尽所有尝试次数,请增加此值或放宽生物群系/地形限制——状态命令会告诉你哪些检查失败最多。如果未找到完美的候选项,回退结构将通过评分结构本身的生物群系、周围生物群系比例和平坦度检查,尽可能接近完美。
玩家传送与消息
这些设置控制玩家如何及何时被传送,以及他们看到什么消息。
teleport_creative_and_spectator (默认:true)
决定是否传送处于创造模式或旁观者模式的玩家。未被传送的玩家将在聊天中收到一条包含传送命令的消息,以便他们在之后仍可以轻松传送到该结构。
teleport_delay_ticks (默认:100)
在玩家加入或找到结构后,等待多久才进行传送,单位为刻(20 刻 = 1 秒)。延迟期间会显示警告。设置为 0 可实现无警告的即时传送。
spawn_proximity_radius (默认:128)
已经在此距离(格)内的玩家将跳过传送,改为接收欢迎消息。这处理了玩家在找到结构后自然在世界出生点生成的常见情况。
kill_nearby_hostiles_radius (默认值:64)
当第一名玩家到达时,清除结构周围区块内敌对生物的范围。生物仅被清除一次。设置为 0 以禁用此功能。
send_popup_messages (默认值:true)
启用或禁用所有弹窗消息。也可以通过将个别消息留空来禁用它们。
send_chat_messages (默认值:true)
启用或禁用所有聊天消息。也可以通过将个别消息留空来禁用它们。
structure_found_message (默认值:"Structure found")
当玩家即将被传送时显示的消息。
welcome_message (默认值:"Welcome home.")
在成功传送后显示的消息。
search_in_progress_title (默认值:"Searching...")
在搜索仍在运行时加入的玩家周期性收到的消息。
search_in_progress_subtitle (默认值:"The server may be slow. Please wait.")
与 search_in_progress_title 一同显示的消息。
failure_message (默认值:"No structure found.")
如果搜索完成但未找到任何候选项,则向玩家显示的消息。
teleport_warning_message_override (默认值:"")
覆盖自动显示的“X 秒后传送...”倒计时消息。可用于翻译该消息或更改其措辞。留空则使用默认倒计时。
将任何消息字段留空将完全禁用该特定消息。
自定义生物生成
1.2 版本新增功能。
在出生点结构的任意标记实体上添加 NBT 数据,以生成指定数量的该类实体。生成的生物实体会被标记为持久化(persistent),这意味着即使所有玩家离开该区域,它们也不会消失。
当定位到出生点结构时,它将在该特定结构中生成所需的生物。不会在任何其他结构中生成自定义生物。 但如果重置了结构出生点,生物将在新的出生点结构中生成。
这些生物免疫当第一名玩家被传送到出生点结构时发生的敌对生物清除效果。
要使用此功能,你需要一个包含一些实体的结构 NBT 文件,在结构中放置盔甲架作为实体标记是完美的选择。请注意,标记在被模组读取后会被删除。
一旦实体存在,使用如 NBTExplorer 这样的 NBT 编辑器打开 NBT 文件,定位标记实体并按照以下确切格式添加自定义 NBT 数据。建议还将现有的 Invisible 布尔值设置为 1,这样如果该模组最终没有删除它们,标记在结构中实际上是不可见的。
"custom_data":
{
"StructureSpawnPoint":
{
"CustomSpawns":
[
{
"EntityType": "minecraft:zombie",
"Amount": 10
},
{
"EntityType": "minecraft:skeleton",
"Amount": 3
}
]
}
}
在向结构 NBT 添加这些 NBT 元素时:custom_data 和 StructureSpawnPoint 是复合标签(Compounds)。CustomSpawns 是一个包含复合标签的列表(List)。EntityType 是字符串(String),Amount 是整数(Int)。
有效的 NBT 标签设置可能如下所示:

已知限制:如果将结构出生点重置为之前访问过的结构,生物可能不会生成。如果发生这种情况,你可以再次重置结构出生点,并使用命令 /structurespawnpoint reset blacklist 将当前结构列入黑名单。
性能
搜索故意在主服务器线程上运行,并在活动期间会导致服务器卡顿。这是预期行为且是暂时的。每当服务器过载时,搜索都会暂停,这确保了服务器绝不会因为刻延迟(tick lag)而崩溃。在搜索期间加入的玩家会通过 search_in_progress_title 和 search_in_progress_subtitle 消息收到通知。一旦找到合适的位置,服务器将立即完全恢复响应。
命令
所有命令都需要至少 2 级的操作者权限。
/structurespawnpoint status
如果搜索正在进行,它将显示其状态。当搜索完成时,它将显示找到的位置和结构 ID,以及一份带有可操作建议的诊断报告(如果搜索难以找到合适的匹配项)。
/structurespawnpoint reset
清除保存的出生点并触发新搜索。所有在线玩家都会收到通知,并在新位置找到时被传送。重置时会重新加载配置,因此配置更改无需完整重启服务器即可生效。
/structurespawnpoint reset blacklist
将当前出生点列入黑名单,以确保它不会再被选为出生点。同时会触发新搜索。
兼容性
- 地形重做模组(已与 Terralith 测试)—— 完全兼容
- 结构放置模组(已与 Improved Village Placement 测试)—— 完全兼容
- 其他出生点模组 —— 兼容;Structure Spawn Point 通常会覆盖其他模组,因为其验证检查需要更长时间才能完成,导致它最后设置世界出生点
- 回放模组(已与 Flashback 测试)—— 完全兼容;回放期间的观察者加入不会触发传送
- 下界和末地维度 —— 不支持;模组仅搜索主世界
备注
- 模组可以随时添加或移除。它在世界和新世界中表现一致,结构位置搜索将在模组添加后的首次服务器启动时运行。当模组被移除时,它会留下一些持久状态,新加入的玩家会在新结构处出生,因为它被设置为世界重生点。稍后重新添加模组不会自动重新执行搜索——请使用重置命令再次进行搜索。
- 玩家在传送过程中可能会短暂地看起来像是掉入世界中,这是在加载目标区块时的视觉伪影,由客户端在区块数据到达之前收到传送指令引起,不会造成任何伤害。
- 支持水下结构,但玩家可能会在水下生成。
- 支持地下结构,但玩家仍会被传送到地表。所有生物群系检查也在地表进行,因此无法检测正确的地下生物群系。
- 搜索仅运行一次。一旦保存了重生点,它会在服务器重启后持续存在。使用
/structurespawnpoint reset 强制进行新的搜索。
- 如果玩家在传送时已经死亡,他们将在重生时被传送。
- 支持单人游戏和专用服务器。
GitHub
许可证
MIT — 欢迎将此模组包含在整合包中。
Structure Spawn Point
Get that perfect start you are always looking for.
Start anywhere; a witch hut, a village, an ocean monument, whatever you feel like.
There are multiple ways the perfect structure is evaluated, most importantly it checks the biome the structure is in, as well as the percentage of the surrounding area that is in your preferred biomes.
This mod also supports custom mob spawns inside your spawn structure, more info further down.
How it works
On server start, it looks for the configured structure. The search starts at 0,0 and searches outward from there. Every candidate is evaluated against your biome preferences and terrain requirements. When the perfect location is found, the world spawn is set there and any players already waiting are teleported. Players who join later are teleported on join.
If your requirements are simple the search will be fast and might even finish before the loading screen is over. If you have some very strict requirements the search could take up to a few minutes. Expect some significant lag spikes while the search is ongoing, but don't worry, as soon as the search is done, that is it, no more performance impact.
Getting started
- Install the mod in your Fabric 1.21.1 modpack alongside Fabric API.
- Start the game once — the mod generates a default config at
config/structure-spawn-point.json.
- Set
target_structure to the structure you want players to spawn in.
- Start the server or join a world. The search runs automatically on every fresh world and will read config on server start or reset command, no need to relaunch the entire game to update the config.
Want different starts in different worlds?
For world-specific configurations, create a file at config/structure-spawn-point/<world-name>.json. World-specific configs take priority over the global config.
Finding your structure ID
Use the /locate structure command in game to find structure IDs (e.g. minecraft:village). This is what you put in target_structure. The mod supports both specific structure IDs and structure tags — just enter either format and the mod tries both automatically. The # prefix used in commands is not required, but including it doesn't break anything.
"target_structure": "minecraft:village"
Examples of valid values:
nova_structures:stray_fort — a specific structure added by a mod
minecraft:village_plains — a specific vanilla village variant (plains only)
minecraft:village — any village variant, resolved via structure tag
Structure locating configurations
These settings control how the mod searches for and evaluates candidate structures.
preferred_biomes (default: forest, plains, meadow)
Biomes the structure should ideally be in. Use namespace:biome_id for a specific biome or namespace:biome_tag for a category. The # prefix is optional. Leave the list empty to accept any biome.
"preferred_biomes": ["minecraft:is_forest", "minecraft:plains", "minecraft:meadow"]
avoided_biomes (default: badlands, beach, jungle, mountain, ocean, swamp)
Biomes to avoid. Same format as preferred_biomes.
"avoided_biomes": ["minecraft:is_ocean", "minecraft:is_badlands"]
min_preferred_area_percentage (default: 60, range: 0–100)
The minimum quality score for the area surrounding the structure (384×384 blocks). The score is based on how much of the surrounding area is in preferred or neutral biomes, with preferred biomes counting double and avoided biomes penalizing heavily. Set to 0 to skip the area check and only consider the structure's immediate biome.
terrain_flatness_check_radius (default: 48, range: 0–128)
Radius in blocks to check for terrain flatness around the structure. The mod measures the height difference between the highest and lowest surface blocks in this area and rejects candidates that exceed max_terrain_height_difference. Set to 0 to disable the terrain check.
max_terrain_height_difference (default: 16, range: 0–100)
Maximum allowed height difference in blocks within the terrain check radius. 16 accepts gentle hills; lower values require flatter ground.
max_search_attempts (default: 10, range: 1–50)
How many structures to evaluate before giving up and using the best found so far. Each attempt takes roughly 1–4 seconds depending on the structure type. The search spirals outward from world center so increasing this covers a larger area. If the search consistently exhausts all attempts, increase this value or relax biome/terrain constraints — the status command will tell you which checks are failing most. If the perfect candidate is not found the structure it falls back to will be as close to perfect as possible by scoring the biome the structure itself is in, the surrounding biome percentage and the flatness checks.
Player teleportation and messages
These settings control how and when players are teleported, and what messages they see.
teleport_creative_and_spectator (default: true)
Decides if players that are in creative or spectator modes get teleported. Players that don't get teleported will be sent a message in chat with the teleport command so that they can still easily teleport to the structure later if they so choose.
teleport_delay_ticks (default: 100)
How long to wait before teleporting a player after they join or after the structure is found, in ticks (20 ticks = 1 second). A warning is shown during the delay. Set to 0 for an instant teleport with no warning.
spawn_proximity_radius (default: 128)
Players already within this many blocks of the structure skip the teleport and receive the welcome message instead. This handles the common case where a player naturally spawns at world spawn after the structure has already been found.
kill_nearby_hostiles_radius (default: 64)
Radius in blocks around the structure to clear hostile mobs when the first player arrives. Mobs are only cleared once. Set to 0 to disable.
send_popup_messages (default: true)
Enables or disables all popup messages. Individual messages can also be disabled by leaving them empty.
send_chat_messages (default: true)
Enables or disables all chat messages. Individual messages can also be disabled by leaving them empty.
structure_found_message (default: "Structure found")
Message shown when a player is about to be teleported.
welcome_message (default: "Welcome home.")
Message shown after a successful teleport.
search_in_progress_title (default: "Searching...")
Message shown periodically to players who join while the search is still running.
search_in_progress_subtitle (default: "The server may be slow. Please wait.")
Message shown alongside search_in_progress_title.
failure_message (default: "No structure found.")
Message shown to players if the search completes without finding any candidate.
teleport_warning_message_override (default: "")
Overrides the automatic "Teleporting in X seconds..." countdown message. Useful for translating the message or changing its wording. Leave empty to use the default countdown.
Leaving any message field empty disables that specific message entirely.
Custom mob spawns
New feature added in version 1.2.
Add NBT data to any marker entity in your spawn structure to spawn in a specified amount of that entity type. Mob entities are marked as persistent when they are spawned in, meaning they won't despawn even if all players leave the area.
When the spawn point structure is located it will spawn the desired mobs in that specific structure. No custom mobs will be spawned in any other structures. But if the structure spawn point is reset mobs will spawn in the new spawn structure.
These mobs are immune to the hostile mobs clear that happens when the first player gets teleported to the spawn structure.
To use this feature you need a structure NBT file that contains some entities, placing down armor stands in your structure as entity markers is perfect. Keep in mind that the marker gets deleted when it has been read by the mod.
Once the entities exist, use a NBT editor like NBTExplorer to open up the NBT file, locate the marker entity and add the custom NBT data exactly in this format. Note that setting the existing Invisible boolean to 1 is also advisable so that the markers are not actually visible in the structure if this mod does not end up deleting them.
"custom_data":
{
"StructureSpawnPoint":
{
"CustomSpawns":
[
{
"EntityType": "minecraft:zombie",
"Amount": 10
},
{
"EntityType": "minecraft:skeleton",
"Amount": 3
}
]
}
}
When adding these NBTElements to the structure NBT: custom_data and StructureSpawnPoint are Compounds. CustomSpawns is a List containing Compounds. EntityType is a String and Amount is an Int.
Here is what a valid NBT tag setup might look like:

Known limitation: if the structure spawn point is reset to a structure that has been visited previously the mobs might not get spawned. If this happens you can reset the structure spawn point again and blacklist the current structure using the command "/structurespawnpoint reset blacklist".
Performance
The search is intentionally run on the server thread and will cause server lag while active. This is expected behavior and temporary. Every time the server is overloaded the search pauses, this makes sure that the server will never crash because of tick lag. Players who join during the search are informed via the search_in_progress_title and search_in_progress_subtitle messages. The server becomes fully responsive again as soon as a suitable location is found.
Commands
All commands require operator level 2.
/structurespawnpoint status
If a search is in progress it will display its status. When the search completes it will display the found position and structure ID, and a diagnostic report with actionable suggestions if the search struggled to find a good match.
/structurespawnpoint reset
Clears the saved spawn point and triggers a new search. All online players are notified and will be teleported when the new location is found. The config is reloaded on reset so config changes take effect without a full server restart.
/structurespawnpoint reset blacklist
Blacklists the current spawn point to ensure that it will not be picked as the spawn point again. Also triggers a new search.
Compatibility
- Terrain overhaul mods (tested with Terralith) — fully compatible
- Structure placement mods (tested with Improved Village Placement) — fully compatible
- Other spawn point mods — compatible; Structure Spawn Point will typically override others since its validation checks take longer to complete, causing it to set the world spawn last
- Replay mods (tested with Flashback) — fully compatible; observer joins during replays do not trigger teleportation
- Nether and End dimensions — not supported; the mod searches the overworld only
Notes
- The mod can be added and removed at any time. It works the same on new and old worlds, the structure location search will run on the first server start after the mod was added. When the mod is removed it will just leave behind some persistent state, new players joining will join at the new structure because it is set as world spawn. Re-adding the mod later will not automatically redo the search - use the reset command to search again.
- Players may briefly appear to fall through the world during teleportation while destination chunks load. This is a visual artifact caused by the client receiving the teleport before chunk data arrives, and causes no damage.
- Underwater structures are supported but can spawn the player underwater.
- Underground structures are supported but the players will still be teleported to the surface. All biome checks are also done at surface level so detecting the correct underground biomes is not possible.
- The search only runs one time. Once a spawn point is saved it persists across server restarts. Use
/structurespawnpoint reset to force a new search.
- Players that are dead when the teleport happens will get teleported when they respawn instead.
- Singleplayer and dedicated server are both supported.
GitHub
License
MIT — feel free to include this mod in modpacks.
评论 0
登录后参与评分
还没有评论,来抢沙发吧