DogModes 增强了 Minecraft 中驯服狼的实用性和生存能力。它引入了模式切换机制,允许玩家在同伴的不同行为之间进行切换,同时具备被动生命恢复和 scavenging(拾荒/捡食)机制。该插件将脆弱的宠物狼转变为可行的战斗盟友和基地守护者。
概览
原版狼通常缺乏在复杂遭遇战中生存或有效守卫区域所需的 AI。DogModes 通过为每只驯服的狼实现一个轻量级的状态机来解决这一问题。玩家可以无需复杂的命令,只需与宠物互动即可实时切换行为模式。
所有数据都持久存储在实体上,确保即使服务器重启后,模式设置仍然保持激活状态。
行为模式
要更改狼的模式,所有者必须对驯服的狼执行 潜行 + 右键点击。当前模式将在动作栏(Action Bar)中显示。
经典模式
默认的原版行为。狼会跟随主人,并攻击主人攻击的目标或被主人攻击的目标。
巡逻模式
专为基地防御和区域控制设计。
- 狼会自动主动攻击配置半径内(默认:16 格)的怪物。
- 它将独立于玩家优先处理威胁。
- 在此模式下,狼会忽略玩家以防止意外的 PvP 事件。
和平模式
专为探索和旅行设计。
- 狼会跟随主人,但严格拒绝发起战斗。
- 它不会攻击主人打击的生物。
- 只有当狼自身受到直接伤害时,才会进行反击(自卫)。
- 这可以防止狼在旅行过程中对苦力怕或大量生物群系发起自杀式攻击。
生存能力机制
为了确保狼在游戏后期依然具有可行性,DogModes 引入了两种被动机制。
被动生命恢复
驯服的狼会随着时间推移被动恢复生命值,类似于玩家。
- 可配置: 生命值和间隔时间在配置文件中完全可调。
- 默认值: 每 3 秒恢复 2.0 点生命值(1 颗心)。
拾荒(腐肉)
狼会本能地消耗附近地面上掉落的腐肉。
- 如果狼受伤并在配置半径内检测到腐肉掉落物,它会消耗该物品以恢复生命值。
- 此机制允许利用刷怪箱掉落物或战斗后的战利品自动治愈巡逻犬。
配置与本地化
该插件设计为高度可配置,以适应不同的服务器平衡需求。
- 模式: 每个模式都可以单独启用或禁用。
- 数值: 调整巡逻半径、恢复速率和治疗量。
- 本地化: 该插件使用 Adventure API 和 MiniMessage 进行格式化。所有消息均可翻译。
- 语言文件: 默认生成英语 (
en) 和俄语 (ru) 语言包。
config.yml 片段:
modes:
patrol:
enabled: true
radius: 16.0
peaceful:
enabled: true
regeneration:
enabled: true
amount: 2.0
interval-seconds: 3
rotten-flesh:
enabled: true
heal-amount: 6.0
DogModes enhances the utility and survivability of tamed wolves in Minecraft. It introduces a mode-switching mechanic, allowing players to toggle between distinct behaviors for their companions, alongside passive regeneration and scavenging mechanics. This plugin transforms wolves from fragile pets into viable combat allies and base guardians.
Overview
Vanilla wolves often lack the necessary AI to survive complex encounters or effectively guard an area. DogModes addresses this by implementing a lightweight state machine for every tamed wolf. Players can cycle through behavioral modes on the fly without complex commands, simply by interacting with their pet.
All data is stored persistently on the entity, ensuring modes remain active even after server restarts.
Behavioral Modes
To change a wolf's mode, the owner must Sneak + Right-Click on the tamed wolf. The current mode will be displayed in the Action Bar.
Classic Mode
The default vanilla behavior. The wolf follows the owner and attacks whatever the owner attacks or is attacked by.
Patrol Mode
Designed for base defense and area denial.
- The wolf automatically aggressively targets monsters within a configurable radius (default: 16 blocks).
- It will prioritize threats independently of the player.
- In this mode, the wolf will ignore players to prevent accidental PvP incidents.
Peaceful Mode
Designed for exploration and travel.
- The wolf will follow the owner but will strictly refuse to initiate combat.
- It will not attack entities the owner strikes.
- The wolf will only fight back if it is directly damaged itself (self-defense).
- This prevents wolves from engaging in suicidal attacks against Creepers or large groups of mobs during travel.
Survivability Mechanics
To ensure wolves remain viable in the late game, DogModes introduces two passive mechanics.
Passive Regeneration
Tamed wolves will passively regenerate health over time, similar to players.
- Configurable: The amount of health and the time interval are fully adjustable in the configuration.
- Default: 2.0 health (1 heart) every 3 seconds.
Scavenging (Rotten Flesh)
Wolves will intuitively consume Rotten Flesh dropped on the ground nearby.
- If a wolf is injured and detects a Rotten Flesh item drop within a configured radius, it will consume the item to restore health.
- This mechanic allows for automated healing of patrol dogs using mob farm drops or simply cleaning up after a battle.
Configuration & Localization
The plugin is designed to be highly configurable to suit different server balance needs.
- Modes: Each mode can be individually enabled or disabled.
- Values: Adjust patrol radii, regeneration rates, and healing amounts.
- Localization: The plugin utilizes the Adventure API and MiniMessage for formatting. All messages are translatable.
- Language Files: English (
en) and Russian (ru) locales are generated by default.
config.yml snippet:
modes:
patrol:
enabled: true
radius: 16.0
peaceful:
enabled: true
regeneration:
enabled: true
amount: 2.0
interval-seconds: 3
rotten-flesh:
enabled: true
heal-amount: 6.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧