宠物配置
宠物文件放在 pet/ 目录。每个文件配置一个宠物。
基础结构
yaml
id: "f1"
identity: "&6宠物-猪猪"
identity-match-contains: false
show-name: "&b{player}的宠物"
entity-type: "PIG"| 配置 | 说明 |
|---|---|
id | 宠物 id,全局不可重复 |
identity | 槽位物品匹配名称 |
identity-match-contains | 是否使用包含匹配 |
show-name | 宠物显示名,支持 {player} |
entity-type | Adyeshach 实体类型 |
entity-type 写错时会回退为 PIG,并在控制台提示错误。
跟随设置
yaml
follow-speed: 0.35
teleport-distance: 16.0
standby-distance: 1.0| 配置 | 说明 |
|---|---|
follow-speed | 宠物跟随速度 |
teleport-distance | 距离主人多远时传送 |
standby-distance | 多近时停止继续靠近 |
自动攻击
yaml
auto-attack-enable: true
track-range: 16.0
attack-range: 3.0
attack-speed: 20
attack-function: "attack"| 配置 | 说明 |
|---|---|
auto-attack-enable | 是否启用自动追击 |
track-range | 追击范围 |
attack-range | 攻击触发距离 |
attack-speed | 攻击间隔,单位 tick |
attack-function | attack 为原版攻击,其他值按 MythicMobs 技能 id 处理 |
宠物追击目标来自主人造成伤害后的目标。
攻击动作
yaml
attack-animation-id: ""
attack-animation-speed: 0攻击动作目前主要用于龙核动作。留空则不播放。
交互指令
yaml
shift-right-command-cooldown: 500
shift-right-command:
- "[console]bc %player_name% 交互了宠物"玩家 Shift 右键宠物后会执行这里的指令。冷却单位为毫秒。
| 前缀 | 执行身份 |
|---|---|
[console] | 后台执行 |
[op] | 临时 OP 身份执行 |
| 无前缀 | 玩家身份执行 |