Always Hostile Animals
所有被动和中性生物都会立即变得敌对!
此模组将牛、猪、绵羊、鸡、马、山羊、羊驼、兔子、鹦鹉以及更多(包括模组生物)转变为看到玩家就会发起攻击的激进袭击者。
非常适合混乱生存挑战、硬核玩法,或者服务器上 一切 都不再安全的场景。
⚠️ 注意: 水生生物(鱼、海龟等)目前不会发动攻击。这将在未来的更新中添加。
? 功能特性
- ? 即时攻击性: 被动和中性生物会立即攻击玩家。
- ? 注入 AI 目标: 动态添加攻击和目标锁定目标,而不会破坏现有的生物 AI。
- ? 自动属性配置: 确保每个非怪物生物都拥有
generic.attack_damage 属性。
- ? 模组兼容: 适用于使用正确分类(
CREATURE、AMBIENT、WATER_*)的模组生物。
- ? 服务器就绪: 在专用服务器上完全可用。
❌ 不受影响的对象
- 敌对生物(僵尸、骷髅等)—— 保持不变
MISC 实体(船只、矿车、投射物、物品)
- v1.0 中的水生生物(计划支持)
⚙️ 兼容性
- Minecraft: 1.21.1
- 加载器: NeoForge (21.1.x)
- 无已知不兼容项
- 除非有其他模组完全覆盖 AI 目标,否则可在大多数整合包中运行
? 安装方法
-
安装 NeoForge 1.21.1
-
将 JAR 文件放入 mods/ 文件夹
-
启动游戏或服务器
为了获得一致的行为,建议使用新存档,以便新生成的实体能正确注入敌对 AI。
? 技术细节
- 使用
EntityAttributeModificationEvent 为所有非怪物生物注册 generic.attack_damage 属性
- 在
EntityJoinLevelEvent 期间添加攻击和目标锁定目标
- 安全检查防止重复目标或崩溃情况
- 伤害回退机制确保没有属性的生物仍能造成正确的近战伤害
⚡ 性能表现
- 100% 基于事件驱动(无 tick 循环扫描)
- 轻量级且安全,适用于大型整合包
- 无明显性能影响
? 常见问题
问: 它是否兼容模组动物?
答: 是的 —— 任何使用 CREATURE、AMBIENT 或 WATER_* 分类的实体均受支持。
(完整的水生 AI 将在后续版本中推出。)
问: 幼年动物也会攻击吗?
答: 是的。计划添加禁用此功能的开关。
问: 为什么鱼还没有攻击行为?
答: 水生动物的寻路机制不同;该功能计划在 v1.1+ 版本中推出。
?️ 开发路线图
- v1.5: 水生生物攻击 AI
- v2.0: 配置选项(伤害缩放、白名单/黑名单)
- 未来版本: 数据包/标签支持
Always Hostile Animals
All passive and neutral mobs become instantly hostile!
This mod turns cows, pigs, sheep, chickens, horses, goats, llamas, rabbits, parrots and many more (including modded creatures) into aggressive attackers that target players on sight.
Perfect for chaos survival challenges, hardcore playthroughs, or servers where nothing is safe anymore.
⚠️ Note: Aquatic mobs (fish, turtles, etc.) do not attack yet. This will be added in a future update.
? Features
- ? Instant aggression: Passive and neutral creatures immediately attack players.
- ? Injected AI goals: Attack and target goals are added dynamically without breaking existing mob AI.
- ? Automatic attributes: Ensures that every non-monster mob has the
generic.attack_damage attribute.
- ? Mod compatible: Works with modded mobs that use proper categories (
CREATURE, AMBIENT, WATER_*).
- ? Server-ready: Fully functional on dedicated servers.
❌ Not affected
- Hostile mobs (zombies, skeletons, etc.) — unchanged
MISC entities (boats, minecarts, projectiles, items)
- Aquatic mobs in v1.0 (support planned)
⚙️ Compatibility
- Minecraft: 1.21.1
- Loader: NeoForge (21.1.x)
- No known incompatibilities
- Works in most modpacks unless another mod fully overrides AI goals
? Installation
-
Install NeoForge 1.21.1
-
Place the JAR into your mods/ folder
-
Launch the game or server
For consistent behavior, use a new world, so newly spawned entities get the hostile AI injected correctly.
? Technical Details
- Registers the
generic.attack_damage attribute for all non-monster mobs using EntityAttributeModificationEvent
- Adds attack and target goals during
EntityJoinLevelEvent
- Safety checks prevent duplicate goals or crash conditions
- A damage fallback ensures that mobs without an attribute still deal correct melee damage
⚡ Performance
- 100% event-driven (no tick-loop scanning)
- Lightweight and safe for large modpacks
- No noticeable performance impact
? FAQ
Q: Does it work with modded animals?
A: Yes — any entity using CREATURE, AMBIENT, or WATER_* categories is supported.
(Full aquatic AI coming in a later version.)
Q: Do baby animals also attack?
A: Yes. A toggle to disable this is planned.
Q: Why don’t fish attack yet?
A: Aquatic pathfinding behaves differently; this feature is planned for v1.1+.
?️ Roadmap
- v1.5: Aquatic mob attack AI
- v2.0: Config options (damage scaling, whitelists/blacklists)
- later: Datapack/tag support
评论 0
登录后参与评分
还没有评论,来抢沙发吧