Tags
Creators
Details
1.1.0
Compatibility
Changes
ChangeLog
1.1.0 - Feature Update
🆕 New Features
新增功能
✅ Fully Data-Driven Nutrient System
✅ 完全数据驱动的营养素系统
- All nutrients are now loaded from
data/{modid}/diet/groups/*.json - 所有营养素现在从
data/{modid}/diet/groups/*.json文件中加载 - Support for custom
translation_keyin nutrient JSON definition - 营养素JSON定义中支持自定义
translation_key翻译键 - Dynamic nutrient listing in GUI - no more hardcoded groups
- GUI中动态渲染营养素列表,不再有硬编码的营养素分组
✅ Nutrient Disable System
✅ 营养素禁用系统
- Added
disabled_groups.jsonsupport for modpacks and datapacks - 新增
disabled_groups.json支持,可供整合包和数据包使用 - Disable any nutrient without modifying Java code
- 无需修改Java代码即可禁用任意营养素
- Priority Rules / 优先级规则:
- 🥇 World Datapack > 🥈 Other Mods > 🥉 AppleSeed Built-in
- 🥇 世界数据包 > 🥈 其他模组 > 🥉 本模组内置
- Same-priority files are merged together
- 同优先级文件的禁用列表会合并处理
Usage / 使用方式:
[
"sugars",
"grains"
]
✅ Priority Override for Nutrient Definitions
✅ 营养素定义优先级覆盖
- Same-name nutrient files follow priority: World Datapack > Other Mods > AppleSeed Built-in
- 同名营养素文件按优先级加载:世界数据包 > 其他模组 > 本模组内置
- Higher priority completely overrides lower priority for same nutrient
- 高优先级同名营养素完全覆盖低优先级定义
- Same-priority duplicates: only first one is processed
- 同优先级同名文件:只处理其中第一个
🐛 Bug Fixes
问题修复
✅ Fixed Death Nutrition Preservation
✅ 修复死亡营养值保留BUG
- Root Cause: Minecraft creates a new Player entity on respawn, old capability data was lost
- 根本原因: Minecraft重生时创建新Player实体,旧的能力数据丢失
- Fix: Implemented UUID-based caching system to restore nutrition on respawn
- 修复方案: 实现基于UUID的缓存系统,重生时恢复死亡前的营养值
Before / 修复前:
keepNutritions = true → all values reset to 0%
After / 修复后:
keepNutritions = true → values preserved correctly
✅ Fixed GUI Crash with Null Icon
✅ 修复空图标导致的GUI崩溃
- Root Cause:
DietGroup.load()set icon tonullduring NBT deserialization - 根本原因: NBT反序列化时
DietGroup.load()将图标设为null - Fix: Default to Apple icon + null-safe rendering guard
- 修复方案: 默认为苹果图标 + 渲染时空值安全检查
✅ Fixed "disabled_groups" being loaded as nutrient
✅ 修复配置文件被误当作营养素加载
- Root Cause:
computeIfAbsentadded Builder to map BEFORE JSON validation - 根本原因:
computeIfAbsent在JSON验证前就把Builder放入map了 - Fix: 3-layer protection + exception rollback
- 修复方案: 三层防护 + 异常回滚机制
✅ Fixed Recipe Book Button Position
✅ 修复配方书开关时按钮错位
- Root Cause: Button position calculated once at init
- 根本原因: 按钮位置仅在初始化时计算一次
- Fix: Dynamic position update on every render frame
- 修复方案: 每渲染帧更新按钮位置
Now the diet button follows the inventory position correctly when recipe book toggles. 现在配方书开关时,膳食按钮会正确跟随物品栏位置。
✨ Improvements
功能优化
✅ Food Data Filtering
✅ 食物数据过滤优化
- Food nutrition entries for disabled nutrients are automatically skipped
- 禁用营养素的食物营养条目自动跳过
getNutritionValue()returns 0 for disabled nutrientsgetNutritionValue()对禁用营养素返回0getNutritions()only returns enabled nutrientsgetNutritions()只返回启用的营养素
✅ GUI Close Button Optimization
✅ GUI关闭按钮优化
- Fixed position: Button now at fixed Y = 200, no longer moves with nutrient count
- 位置固定: 按钮现在固定在Y=200位置,不再随营养素数量移动
- Auto-hide: Button hidden when > 8 nutrients enabled (ESC only)
- 自动隐藏: > 8种营养素时隐藏按钮(仅ESC关闭)
📦 Technical Changes
技术变更
- Enhanced DietGroups loader with priority sorting
- 增强的DietGroups加载器,支持优先级排序
- Added comprehensive logging for override detection
- 添加完整的覆盖检测日志输出
- Improved error handling and cleanup for parsing failures
- 改进解析失败时的错误处理和清理
- Static reference to inventory button for position updates
- 物品栏按钮使用静态引用便于位置更新
Build Information
构建信息
- Minecraft: 1.21.1
- NeoForge: 21.1.222
- Build Verified: ✅ SUCCESS
- 构建验证:✅ 成功
Summary
总结
This update transforms AppleSeed into a truly modpack-friendly mod: 本次更新将AppleSeed转变为真正适合整合包的模组:
✅ No code changes required for nutrient customization ✅ 自定义营养素无需修改代码 ✅ Full control via datapacks ✅ 通过数据包完全控制 ✅ Enable/disable any nutrient at will ✅ 随意启用/禁用任何营养素 ✅ Override any nutrient definition from other mods/datapacks ✅ 从其他模组/数据包覆盖任何营养素定义 ✅ All known bugs fixed ✅ 所有已知BUG已修复
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:uwTJPjNt:gMV0Ci0i"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:uwTJPjNt:gMV0Ci0i"
}

