让你的朋友喝下
这是 Let Your Friend Eating (qkQbFn8p) 的一个插件,允许玩家与朋友分享药水、蜂蜜瓶以及来自模组的饮品——内置有害饮品保护功能、可配置的物品/标签黑名单,并支持在全饥饿状态下喂食食物。
特性
- 通用饮品喂食(
UseAnim.DRINK / ItemUseAnimation.DRINK):通过 Let Your Friend Eating 的原生交互方式、冷却时间和统计系统,将原版药水、蜂蜜瓶和模组饮品喂给其他玩家。牛奶桶仍由 Let Your Friend Eating 处理。
- 有害饮品保护(默认开启):当
allowHarmfulDrinks = false 时,阻止喂食包含任何 MobEffectCategory.HARMFUL 状态效果(如中毒、瞬间伤害、虚弱、不祥之瓶、有害的诡异炖菜等)的饮品,并向喂食者显示红色的动作栏提示。将 allowHarmfulDrinks = true 设置为开启,可用于友好的恶作剧。
- 全饥饿状态食物喂食桥接(默认开启):当
allowFeedingAtFullHunger = true 时,即使接收者的饥饿值已满(>= 20),也允许通过 Let Your Friend Eating 喂食普通的非饮品类食物(金苹果、增益食物、模组美食等),并在之后安全地恢复或钳制饥饿状态。
- 黑名单与数据包标签:可通过
config/let_your_friend_drink.toml 排除特定的物品 ID(如 minecraft:ominous_bottle)或物品标签(如 #c:drinks),或使用内置的数据包标签 #let_your_friend_drink:excluded 进行排除。
- 原生游戏内配置界面与 4 种语言:零依赖的原版配置界面,可通过 Mod Menu(Fabric)以及原生的 Forge / NeoForge 模组界面访问,提供英语 (
en_us)、简体中文 (zh_cn)、繁体中文 (zh_tw) 和日语 (ja_jp) 本地化支持。
- 精确容器返还与公开事件 API:将空的玻璃瓶/容器返还至喂食者的手、背包或地面;在创造模式下保留物品;每次成功完成饮品喂食后触发
FriendDrinkCompletedEvents 事件。
需求
支持矩阵(8 个目标)
| Minecraft |
加载器 |
Java |
上游 LYFE 测试版本 |
1.20.1 |
Fabric, Forge |
17 |
Fabric 1.1.2, Forge 1.1.3 |
1.21.1 |
Fabric, NeoForge |
21 |
Fabric 1.1.2, NeoForge 1.1.4 |
26.1.2 |
Fabric, NeoForge |
25 |
Fabric 1.2.0, NeoForge 1.1.2 |
26.2 |
Fabric, NeoForge |
25 |
Fabric 1.1.2, NeoForge 1.1.2 |
配置
存储于 config/let_your_friend_drink.toml(首次启动时自动生成,可从游戏内配置界面热保存):
[general]
allowHarmfulDrinks = false
allowFeedingAtFullHunger = true
excludedItems = []
从源码构建
python3 scripts/build-matrix.py
构建脚本会运行 JUnit 5 测试套件,自动从 Modrinth CDN 获取并通过 ABI 验证编译时的上游 Let Your Friend Eating JAR 文件,将所有 8 个加载器/版本的 JAR 文件构建到 build/releases/ 目录中,并对每个制品进行审计。
许可证
GPL-3.0-or-later — 请参阅 LICENSE。
Let Your Friend Drink
An addon for Let Your Friend Eating (qkQbFn8p) that lets players share potions, honey bottles, and modded drinks with friends — with built-in harmful-drink protection, configurable item/tag blacklists, and full-hunger food feeding support.
Features
- Universal Drink Feeding (
UseAnim.DRINK / ItemUseAnimation.DRINK): Feed vanilla potions, honey bottles, and modded drinks to other players using Let Your Friend Eating's native interaction, cooldowns, and statistics. Milk buckets remain delegated to Let Your Friend Eating.
- Harmful Drink Protection (Default ON): Blocks feeding drinks containing any
MobEffectCategory.HARMFUL status effect (Poison, Instant Damage, Weakness, Ominous Bottle, harmful Suspicious Stew, etc.) when allowHarmfulDrinks = false, displaying a red actionbar notice to the feeder. Flip allowHarmfulDrinks = true for friendly pranks.
- Full-Hunger Food Feeding Bridge (Default ON): When
allowFeedingAtFullHunger = true, allows feeding normal non-drink food items (Golden Apples, buff foods, modded cuisine) through Let Your Friend Eating even when the recipient's hunger bar is already full (>= 20), safely restoring/clamping hunger state afterward.
- Blacklist & Datapack Tag: Exclude specific item IDs (
minecraft:ominous_bottle) or item tags (#c:drinks) via config/let_your_friend_drink.toml, or through the built-in #let_your_friend_drink:excluded datapack tag.
- Native In-Game Config Screen & 4 Languages: Zero-dependency vanilla config screen accessible via Mod Menu (Fabric) and native Forge / NeoForge mod screens, localized in English (
en_us), Simplified Chinese (zh_cn), Traditional Chinese (zh_tw), and Japanese (ja_jp).
- Accurate Container Return & Public Event API: Returns empty glass bottles/containers to the feeder's hand, inventory, or ground; preserves items in Creative mode; fires
FriendDrinkCompletedEvents after every successful drink feed.
Requirements
- Required: Let Your Friend Eating (
>= 1.1.2)
- Standalone single JAR with zero other library dependencies (no Fabric API required).
Supported Matrix (8 Targets)
| Minecraft |
Loaders |
Java |
Upstream LYFE Tested |
1.20.1 |
Fabric, Forge |
17 |
Fabric 1.1.2, Forge 1.1.3 |
1.21.1 |
Fabric, NeoForge |
21 |
Fabric 1.1.2, NeoForge 1.1.4 |
26.1.2 |
Fabric, NeoForge |
25 |
Fabric 1.2.0, NeoForge 1.1.2 |
26.2 |
Fabric, NeoForge |
25 |
Fabric 1.1.2, NeoForge 1.1.2 |
Configuration
Stored at config/let_your_friend_drink.toml (auto-generated on first launch, hot-saved from the in-game config screen):
[general]
allowHarmfulDrinks = false
allowFeedingAtFullHunger = true
excludedItems = []
Building from Source
python3 scripts/build-matrix.py
The build script runs the JUnit 5 test suite, automatically fetches and ABI-verifies the compile-time upstream Let Your Friend Eating JARs from Modrinth CDN, builds all 8 loader/version JARs into build/releases/, and audits every artifact.
License
GPL-3.0-or-later — see LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧