牲畜忠诚
引入了一套基于喂食历史的农场动物所有权系统。
机制
当玩家向牛、羊、猪、鸡或兔子喂食小麦、种子、胡萝卜或其他繁殖物品时,该动物会与玩家建立羁绊。受羁绊的动物仅对主人显示爱心粒子效果,并会完全拒绝其他玩家提供的繁殖物品。
当主人在 16 格范围内且手持合适的食物时,受羁绊的牲畜会缓慢走向主人,使放牧变得轻松许多。
所有权转移
玩家可以通过命令 /trigger GiveAnimal 将动物转移给其他玩家。操作时需注视一只已建立羁绊的生物,并且附近有其他玩家存在。所有权将转移至距离最近(5 格内)的玩家。
技术细节
- 使用记分板跟踪所有者 UUID
- 除启用触发器命令外,无需任何权限
- 所有检测运行在 20 tick 周期上,以维持服务器性能
- 野生未建立羁绊的动物在首次被任何玩家喂食前行为完全正常
目的
在多玩家服务器上实现自然的牲畜管理,防止玩家意外繁殖或带离他人的动物。
Livestock Loyalty
Introduces a simple ownership system for farm animals based on feeding history.
Mechanics
When a player feeds wheat, seeds, carrots, or other breeding items to cows, sheep, pigs, chickens, or rabbits, that animal becomes bonded to them. Bonded animals display heart particles only for their owner and will refuse breeding items from other players entirely.
Bonded livestock will slowly walk toward their owner when the owner is within 16 blocks and holding the appropriate food item, making herding significantly easier.
Ownership Transfer
Animals can be transferred to another player using the command /trigger GiveAnimal while looking at a bonded creature and having another player nearby. Ownership transfers to the nearest player within 5 blocks.
Technical Details
- Uses scoreboards to track owner UUIDs
- Requires no permissions beyond the trigger command being enabled
- All detection runs on a 20-tick cycle to maintain server performance
- Wild unbonded animals behave completely normally until first fed by any player
Purpose
Creates natural livestock management on multiplayer servers where players cannot accidentally breed or lead away someone else's animals.
评论 0
登录后参与评分
还没有评论,来抢沙发吧