FullBelly - 全面的动作饥饿系统
简介
FullBelly 是一款 Minecraft NeoForge 模组(1.21.1),它添加了一个基于全面动作的饥饿消耗系统。该模组会追踪玩家的各种行为,并自动扣除相应的饥饿值,使生存模式更具挑战性和真实感。
功能特性
- 全动作覆盖:追踪 26 种不同类型的玩家行为
- 原版兼容:基于原版疲劳机制,与原生游戏机制完全兼容
- 调试 UI:实时 HUD 显示食物等级、疲劳百分比和最近的动作(仅限调试模式)
- 动作记录:通过 Emoji 图标和相关动作连击检测提供视觉反馈
- 服务端处理:所有计算均在服务端执行,确保不影响客户端性能
- 可配置:可通过游戏内命令或配置文件切换调试模式
动作类型与消耗值
移动类(9 种)
| 动作 |
基础消耗 |
描述 |
| ? 行走 |
0.005/刻 |
地面移动 |
| ? 冲刺 |
0.05/刻 |
疾跑(原版标准) |
| ? 潜行 |
0.005/刻 |
蹲伏移动 |
| ? 游泳 |
0.0075/刻 |
水中移动(原版标准) |
| ? 水下游泳 |
0.01/刻 |
在水下憋气 |
| ? 攀爬 |
0.025/刻 |
梯子/藤蔓 |
| ? 鞘翅飞行 |
0.04/刻 |
滑翔 |
即时动作(3 种)
| 动作 |
基础消耗 |
描述 |
| ⬆ 跳跃 |
0.025/次 |
起跳(原版标准) |
| ⚔ 近战攻击 |
0.005/次 |
击中实体 |
| ? 暴击 |
0.005/次 |
下落暴击 |
工具行为(4 种)
| 动作 |
基础消耗 |
描述 |
| ⛏ 挖掘 |
0.0025/方块 |
破坏方块 |
| ? 放置 |
0.005/次 |
放置方块 |
| ? 抛竿钓鱼 |
0.005/次 |
抛出鱼竿 |
| ? 收线钓鱼 |
0.005/次 |
收回鱼线 |
战斗行为(9 种)
| 动作 |
基础消耗 |
描述 |
| ? 受到伤害 |
0.005/次 |
任何伤害来源 |
| ? 成功格挡 |
0.005/次 |
盾牌成功格挡 |
| ? 持盾状态 |
0.005/刻 |
持续持盾 |
| ? 拉弓蓄力 |
0.005/刻 |
弓箭蓄力 |
| ? 射击 |
0.005/次 |
弓箭发射 |
| ? 弩装填 |
0.005/刻 |
弩装填 |
| ? 弩射击 |
0.005/次 |
弩发射 |
| ? 三叉戟蓄力 |
0.0075/刻 |
三叉戟蓄力 |
| ? 投掷三叉戟 |
0.015/次 |
投掷三叉戟 |
其他(1 种)
| 动作 |
基础消耗 |
描述 |
| ? 落地冲击 |
0.005/次 |
从高处落下(>3 个方块) |
使用指南
安装
- 确保已安装 NeoForge 21.1.227+(Minecraft 1.21.1)
- 将
fullbelly-1.0.3.jar 放入 .minecraft/mods 文件夹
- 启动游戏
调试模式
该模组内置了调试模式,可显示带有详细信息的实时 HUD 覆盖层。
游戏内命令:
/fullbelly debug - 检查当前调试模式状态
/fullbelly debug true - 启用调试模式
/fullbelly debug false - 禁用调试模式
调试 HUD 显示:
启用后,您将看到一个覆盖层,显示:
- ? 食物等级:当前饥饿点数(0-20)
- ⚡ 疲劳:当前疲劳百分比(0-100%)
- 最近动作:最后 5 个动作,带有 Emoji 图标和疲劳值
- 总疲劳:自启用调试模式以来的累计疲劳
动作连击检测:
快速连续执行的关联动作会被分组在一起:
- 绿色背景:最新动作连击
- 红色背景:前一个动作连击
- 动作会随时间逐渐消失
配置文件:
您也可以编辑 .minecraft/config/fullbelly-common.toml:
debug_mode = true
注意:为了获得最佳性能,调试模式默认处于禁用状态。禁用时,饥饿消耗仍正常工作,但不会显示 UI。
调整难度
修改 FatigueProcessor.java 中的基础值:
技术实现
核心组件
- ActionType:定义 24 种动作类型的枚举
- FatigueProcessor:核心处理器,向 FoodData 应用疲劳
- MovementHandler:使用位置追踪检测玩家移动
- ExhaustionHandler:捕获方块破坏/放置事件
- PlayerMixin:通过 Mixin 注入检测各种行为
工作原理
- 通过 Mixin 和事件系统检测玩家行为
- 调用
FatigueProcessor.dispatch() 处理消耗
- 使用原版
FoodData.addExhaustion() 方法应用消耗
- 当疲劳累积到 4.0 时,自动扣除 1 点食物值
兼容性
- ✅ NeoForge 21.1.229
- ✅ Minecraft 1.21.1
- ✅ 可在服务端/客户端运行
- ✅ 与其他模组无冲突
许可证
本项目在 MIT 许可证下开源。
版本:1.0.3
Minecraft:1.21.1
NeoForge:21.1.227+
最后更新:2026-05-13
更新日志
v1.0.3 (2026-05-13)
- ✨ 将所有基础消耗值降低 50%,以改善平衡性
- ✨ 将所有 Emoji 图标更改为单字符变体,以获得更好的渲染效果
- ✨ 为调试模式添加了实时 HUD 覆盖层(替换聊天消息)
- ✨ 实现了带有视觉分组的动作连击检测
- ✨ 添加了疲劳百分比显示(0-100%)
- ✨ 优化调试模式:禁用时无动作记录(防止内存泄漏)
- ? 修复了挖掘检测,包括所有方块类型(而不仅仅是工具可挖掘的)
- ? 修复了连击背景透明度与文本的淡出问题
v1.0.2 (Previous)
- 首次发布,包含全面的动作追踪
- 支持 24 种动作类型
- 服务端疲劳处理
- 带有聊天输出的调试模式
有关详细的版本历史,请参阅 CHANGELOG.md。
FullBelly - Comprehensive Action Hunger System
Introduction
FullBelly is a Minecraft NeoForge mod (1.21.1) that adds a comprehensive action-based hunger consumption system. The mod tracks various player behaviors and automatically deducts corresponding hunger, making survival mode more challenging and realistic.
Features
- Full Action Coverage: Tracks 26 different types of player behaviors
- Vanilla Compatible: Based on vanilla exhaustion mechanism, fully compatible with native game mechanics
- Debug UI: Real-time HUD display showing food level, exhaustion percentage, and recent actions (debug mode only)
- Action Recording: Visual feedback with emoji icons and combo detection for related actions
- Server-side Processing: All calculations execute on server side, ensuring no client performance impact
- Configurable: Toggle debug mode via in-game commands or configuration file
Action Types & Consumption Values
Movement (9 types)
| Action |
Base Cost |
Description |
| ? Walking |
0.005/tick |
Ground movement |
| ? Sprinting |
0.05/tick |
Sprinting (vanilla standard) |
| ? Sneaking |
0.005/tick |
Crouching movement |
| ? Swimming |
0.0075/tick |
Water movement (vanilla standard) |
| ? Underwater Swimming |
0.01/tick |
Holding breath underwater |
| ? Climbing |
0.025/tick |
Ladders/vines |
| ? Elytra Flight |
0.04/tick |
Gliding |
Instant Actions (3 types)
| Action |
Base Cost |
Description |
| ⬆ Jumping |
0.025/time |
Takeoff (vanilla standard) |
| ⚔ Melee Attack |
0.005/time |
Hit entity |
| ? Critical Hit |
0.005/time |
Falling critical hit |
Tool Behaviors (4 types)
| Action |
Base Cost |
Description |
| ⛏ Mining |
0.0025/block |
Breaking blocks |
| ? Placing |
0.005/time |
Placing blocks |
| ? Fishing Cast |
0.005/time |
Casting fishing rod |
| ? Fishing Reel |
0.005/time |
Reeling in |
Combat Behaviors (9 types)
| Action |
Base Cost |
Description |
| ? Damage Taken |
0.005/time |
Any damage source |
| ? Block Success |
0.005/time |
Shield successful block |
| ? Shield Holding |
0.005/tick |
Continuous shield holding |
| ? Bow Charging |
0.005/tick |
Bow charging |
| ? Bow Shot |
0.005/time |
Bow firing |
| ? Crossbow Load |
0.005/tick |
Crossbow loading |
| ? Crossbow Fire |
0.005/time |
Crossbow firing |
| ? Trident Charge |
0.0075/tick |
Trident charging |
| ? Trident Throw |
0.015/time |
Trident throwing |
Other (1 type)
| Action |
Base Cost |
Description |
| ? Fall Impact |
0.005/time |
Landing from height (>3 blocks) |
Usage Guide
Installation
- Ensure NeoForge 21.1.227+ is installed (Minecraft 1.21.1)
- Place
fullbelly-1.0.3.jar into .minecraft/mods folder
- Launch the game
Debug Mode
The mod includes a built-in debug mode that displays a real-time HUD overlay with detailed information.
In-game Commands:
/fullbelly debug - Check current debug mode status
/fullbelly debug true - Enable debug mode
/fullbelly debug false - Disable debug mode
Debug HUD Display:
When enabled, you'll see an overlay showing:
- ? Food Level: Current hunger points (0-20)
- ⚡ Exhaustion: Current exhaustion as percentage (0-100%)
- Recent Actions: Last 5 actions with emoji icons and exhaustion values
- Total Exhaustion: Cumulative exhaustion since debug mode enabled
Action Combo Detection:
Related actions performed in quick succession are grouped together:
- Green background: Most recent action combo
- Red background: Previous action combo
- Actions fade out over time
Configuration File:
You can also edit .minecraft/config/fullbelly-common.toml:
debug_mode = true
Note: Debug mode is disabled by default for optimal performance. When disabled, hunger consumption still works normally but no UI is displayed.
Adjust Difficulty
Modify base values in FatigueProcessor.java:
- Lower values = Easy mode
- Higher values = Hard mode
Technical Implementation
Core Components
- ActionType: Enum defining 24 action types
- FatigueProcessor: Core processor, applies exhaustion to FoodData
- MovementHandler: Detects player movement using position tracking
- ExhaustionHandler: Captures block break/place events
- PlayerMixin: Detects various behaviors through Mixin injection
How It Works
- Detect player behaviors through Mixin and event system
- Call
FatigueProcessor.dispatch() to process consumption
- Apply consumption using vanilla
FoodData.addExhaustion() method
- When exhaustion accumulates to 4.0, automatically deducts 1 food point
Compatibility
- ✅ NeoForge 21.1.229
- ✅ Minecraft 1.21.1
- ✅ Runs on both server/client
- ✅ No conflicts with other mods
License
This project is open-sourced under the MIT License.
Version: 1.0.3
Minecraft: 1.21.1
NeoForge: 21.1.227+
Last Updated: 2026-05-13
Changelog
v1.0.3 (2026-05-13)
- ✨ Reduced all base consumption values by 50% for better balance
- ✨ Changed all emoji icons to single-character variants for better rendering
- ✨ Added real-time HUD overlay for debug mode (replaces chat messages)
- ✨ Implemented action combo detection with visual grouping
- ✨ Added exhaustion percentage display (0-100%)
- ✨ Optimized debug mode: no action recording when disabled (prevents memory leak)
- ? Fixed mining detection to include all block types (not just tool-mineable)
- ? Fixed combo background transparency fading with text
v1.0.2 (Previous)
- Initial release with comprehensive action tracking
- 24 action types supported
- Server-side exhaustion processing
- Debug mode with chat output
See CHANGELOG.md for detailed version history.
评论 0
登录后参与评分
还没有评论,来抢沙发吧