? 村民寻路修复
让你的村民更聪明、更安全,也更少惹人烦。
你是否厌倦了村民卡在敞开的门口?他们是否经常互相推搡挤进角落直到窒息?当僵尸攻击时,他们是否只是站在那里坐以待毙?
Villager Pathfinding Fix 是一款针对 Fabric (1.21+) 的服务端逻辑重构模组,它解决了村庄管理中最大的痛点。它不会添加新的物品或方块——它只是修复了你已有的村民的“大脑”。
✨ 主要功能
? 智能门处理
原版村民仅检查门的状态是否为“打开”(Open)。此模组改变了这一行为。村民现在会检查前方方块的物理碰撞箱。
- 修复“故障”门: 村民现在可以打开并穿过侧放或处于复杂红石配置中的门,这些情况通常会破坏原版 AI。
- 不再疯狂开关门: 如果一群村民正在通过一扇门,第一个村民打开它后,他们会保持开启状态,直到最后一个村民通过。再也不用担心门在村民脸上砰地关上了。
? 交通控制(礼让)
村民以粗鲁著称。当两个村民试图挤过一个 1 格宽的缝隙时,他们通常会无休止地互相推搡。
- “你先请”逻辑: 当两个村民在移动时发生碰撞,模组会检测到冲突。
- 礼让: 其中一个村民(基于实体 ID)将停止寻路,等待,并被轻微推开,以便让另一个村民通过。
?️ 高级恐慌与防御
村民不再是无助的受害者。此模组实现了一个**“恐惧层级”**,使他们主动寻求生存。
1. 连锁反应:
如果一个村民受到攻击,他会尖叫(比喻义)。所有在15 格半径内的其他村民会立即进入恐慌模式,即使他们没有看到攻击者。
2. 寻找铁傀儡(告密):
恐慌的村民不再盲目奔跑,而是扫描 50 格范围内是否有铁傀儡。
- 如果找到,他们会跑向铁傀儡寻求保护。
- 告密机制: 村民会告诉铁傀儡是谁攻击了他们。铁傀儡会立即锁定攻击者,即使铁傀儡本身没有被击中。
3. 主动逃跑:
如果没有找到铁傀儡也没有床,村民会计算出一个直接背离攻击者的向量,并全速奔向安全地带。
? 卡住检测
有时,Minecraft 就是会出 bug。
- 如果村民尝试移动但在 3 秒(60 刻)内未能离开当前方块,模组会强制执行“记忆清除”,重置其当前的路径。
- 他们将立即重新计算一条新路径,通常能让他们从角落或栅栏中解脱出来。
⚙️ 技术信息
- 加载器: Fabric
- Minecraft 版本: 1.21+
- 运行端: 服务器必需(客户端可选)。
- 兼容性: 应与大多数模组村民兼容,前提是他们使用标准的
VillagerEntity 类或继承自该类。
? 整合包
你可以自由地将此模组用于任何整合包!
发现 bug 了?村民们正在策划革命?去 Issues 页面报告吧!
? Villager Pathfinding Fix
Make your villagers smarter, safer, and less annoying.
Are you tired of villagers getting stuck on open doors? Do they constantly shove each other into corners until they suffocate? Do they just stand there and accept their fate when a Zombie attacks?
Villager Pathfinding Fix is a server-side logic overhaul for Fabric (1.21+) that solves the biggest frustrations in village management. It doesn't add new items or blocks—it just fixes the brains of the villagers you already have.
✨ Key Features
? Smart Door Handling
Vanilla villagers only check if a door state is "Open". This mod changes that. Villagers now check the physical collision box of the block in front of them.
- Fixes "Glitched" Doors: Villagers can now open and pass through doors placed sideways or in complex redstone configurations that usually break vanilla AI.
- No More Door Spam: If a group of villagers is passing through a door, the first one opens it, and they keep it open until the last one passes. No more slamming doors in each other's faces.
? Traffic Control (Yielding)
Villagers are notoriously rude. When two of them try to fit through a 1-block gap, they usually push each other endlessly.
- The "After You" Logic: When two villagers collide while trying to move, the mod detects the conflict.
- Yielding: One villager (based on entity ID) will stop pathfinding, wait, and get slightly nudged back to let the other pass.
?️ Advanced Panic & Defense
Villagers are no longer helpless victims. This mod implements a "Hierarchy of Fear" that makes them actively seek survival.
1. Chain Reaction:
If one villager gets hit, they scream (figuratively). All other villagers within a 15-block radius immediately enter panic mode, even if they didn't see the attacker.
2. Seek the Golem (Snitching):
Instead of running blindly, panicked villagers scan for an Iron Golem within 50 blocks.
- If found, they run towards the Golem for protection.
- The Snitch Mechanic: The villager tells the Golem who attacked them. The Golem will immediately target the attacker, even if the Golem wasn't hit itself.
3. Active Fleeing:
If no Golem and no Bed are found, the villager calculates a vector directly away from the attacker and sprints for safety.
? Stuck Detection
Sometimes, Minecraft just breaks.
- If a villager tries to move but fails to leave their block for 3 seconds (60 ticks), the mod forces a "Memory Wipe" of their current path.
- They will immediately recalculate a fresh path, often freeing themselves from corners or fences.
⚙️ Technical Info
- Loader: Fabric
- Minecraft Version: 1.21+
- Side: Required on Server (Optional on Client).
- Compatibility: Should be compatible with most modded villagers, provided they use the standard
VillagerEntity class or inherit from it.
? Modpacks
You are free to use this mod in any modpack!
Found a bug? The villagers are plotting a revolution? Report it on the Issues page!
评论 0
登录后参与评分
还没有评论,来抢沙发吧