FishNoStuck
一款小型模组,修复了鱼类完全停止移动的问题 MC-182763
支持 Minecraft 1.17.x-1.20.x,适用于 Fabric(Quilt 可能也可以?)/Forge
工作原理
鱼类拥有一个 AI 目标,用于扫描最近的鱼,并随机选择一只作为领导者及其追随者。随后,追随者会跟随领导者移动。
本模组通过检查最近的鱼是否为领导者,对 FollowFlockLeaderGoal 应用了漏洞修复。
如果不是领导者,则将其加入追随者列表。
如果领导者被错误地加入了追随者列表,
鱼领导者将停止移动,不会前往任何地方,连同其追随者一起(永远!)。
除非你攻击它们,或者切换到生存模式并在它们附近游泳。
有关 Minecraft 漏洞报告的详情,请参阅:
本模组的另一项修复包括:
- 在避免实体的目标中,使用
EntitySelector.NO_CREATIVE_OR_SPECTATOR 而非 EntitySelector.NO_SPECTATORS 来检查实体谓词。
- 在
FishSwimGoal 中将 checkNoActionTime 设置为 false,以修复鱼类卡在当前位置的问题。
- 当追随者鱼被杀死时,减少领导者鱼的
schoolSize。
性能影响
本模组不会提升任何游戏性能,或者仅有极轻微的影响,尤其是对鱼类而言。
详见 FishNoStuck#1
安装方法
- 安装 Fabric Loader / MinecraftForge
- 将模组复制到
mods 文件夹
背景故事
我在开发 Fish of Thieves 时,通过研究 FollowFlockLeaderGoal 了解了其工作原理,然后将其转换为使用 Brain 系统。
通过在实体上方显示调试数据来实现。

随后我意识到出了问题。一条具有 schoolSize=8 的鱼拥有属性 isFollower=true 并且有一个领导者,这原本是不可能的。
这就是本模组的起源。

FishNoStuck
A small mod that fixes fish stop moving entirely MC-182763
Support with Minecraft 1.17.x-1.20.x for Fabric (Quilt maybe?)/Forge
How it works
The fish has an AI Goal that scans for the nearest fish, which will randomly select a leader and followers. Then it will let the follower fish follow the leader.
This mod applies bug fix to FollowFlockLeaderGoal by checking the nearest fish if it is a leader or not.
If not, it will add into the follower list.
If leader gets added into the follower list.
A Fish Leader will stop and not go to anywhere along with their followers (Forever!).
Unless you hit them or switch gamemode to survival and swim near them.
For Minecraft Bug Report, see:
Another fix in this mod is:
- Check entity predicate by using
EntitySelector.NO_CREATIVE_OR_SPECTATOR instead of EntitySelector.NO_SPECTATORS in avoid entity goal.
- Set
checkNoActionTime to false in FishSwimGoal to fix fish getting stuck at the current position
- Decreased
schoolSize from leader fish if the follower fish is getting killed.
Performance Impact
This mod doesn't improve any game performance, or it has very minor impact, especially for fish.
See FishNoStuck#1
Installation
- Install Fabric Loader/MinecraftForge
- Copy mod into
mods folder
Backstory
I was working on Fish of Thieves by looking at FollowFlockLeaderGoal and figure it out how it works, then convert it to use Brain system.
By display debug data above an entity.

Then I realize something wrong. A fish with schoolSize=8 has property isFollower=true and has a leader. Which it should not be possible.
So that's the beginning of this mod.

评论 0
登录后参与评分
还没有评论,来抢沙发吧