SimpleDifficulty Reforged
SimpleDifficulty For Underdog 的改进版分支
概述
SimpleDifficulty 为 Minecraft 1.12.2 引入了体温与口渴系统,其基础机制参考了 Tough As Nails 等生存模组。这个维护中的分支专注于:
- Bug 修复和稳定性提升
- 扩展模组兼容性以适配大型整合包
- 技术优化以实现流畅的游戏体验
- 代码现代化与清理
关于项目起源:
该模组是四个月持续且专注的开发成果(从五月到九月)。由于优化和代码重构的工作量巨大(修改了超过 9,000 行代码),我决定单独发布这个更新版本,以便您能立即受益于内存泄漏修复和性能提升。如果您想了解所有更改的技术细节,请随时查看 原始拉取请求
如需更简单、易于理解的更改列表,请查看仓库中的此 文件
特性
核心机制
- 口渴系统:玩家需要管理水分水平,以避免负面状态效果。
- 温度动态变化:环境生物群系、方块和盔甲会影响玩家的体温。
- 低体温症和高体温症:现在会降低最大生命值并施加负面药水效果,而不是直接造成伤害。(注意:Spice of Life 的生命值修正器在计算中被忽略)。
- 水体变体:
- 普通水:标准补水来源。
- 海水:饮用后会增加脱水速率。
- 净化水 / 泉水:安全、干净的补水来源,具有最佳饱和值。原版水现在被视为泉水。(注意:水本身必须使用其他模组生成。推荐使用 Cave Generator)。
完善的水与物品系统
- 水壶大修:修正了耐久度逻辑和口渴恢复缩放比例。饮用净化水会准确更新物品和来源。
- 瓶子交互:空瓶现在会动态检测特定的环境流体类型(盐、普通或泉水),而不再默认仅限于原版水方块。
- 一致的烹饪逻辑:修正了烹饪逻辑,防止特殊流体容器(如泉水瓶)在处理过程中降级为标准变体。
- 配方清理:移除了冗余或损坏的水壶和过滤器无形状配方,以防止合成冲突。
- 视觉调整:流体颜色渲染会根据生物群系位置有机适应,具有自定义的深度雾效设置。
- 增强雾效:改善了水中雾效视觉效果。雾效颜色现在更明亮,并根据生物群系变化。
- 自定义选项:添加了新的配置选项,使水体变暗或变亮。
- 冰块机制:添加了普通水和海水的冰!🧊 在适用环境中生成天然冰结构。包含世界生成器,并实现了融化、冻结以及 Serene Seasons 支持。完全兼容冻结/融化方块状态。
技术优化
专为减少大型整合包中的服务器开销和客户端卡顿而设计。
内存管理
泄漏解决
- 识别并关闭了与位置世界跟踪相关的内存泄漏
- 修复了玩家断开连接时能力数据未正确释放的问题
- 优化了事件处理器注册,以防止重复监听器
数据足迹
- 精简了核心温度子系统内部的遥测存储
- 与原始分支相比,全局内存使用量减少了约 40%
- 为非关键数据结构实现了懒加载
处理效率
执行门控
- 在主要处理循环中实现了提前退出逻辑
- 当跟踪系统处于非活动状态时,减少了不必要的刻评估
- 为频繁访问的计算添加了缓存
子系统调优
- 优化了环境水方块扫描算法
- 改进了水壶消耗动作的性能
- 精简了逐刻口渴计算
- 添加了盐水/淡水混合逻辑,并采用了一种不影响性能的优化填充算法。
- 移除了流体的粒子效果,并略微提高了流体渲染的性能。
垃圾回收
- 降低了标准游戏循环期间的对象实例化率
- 为频繁创建/销毁的对象实现了对象池
- 将 Java 垃圾收集器的开销降低了约 60%
模组集成
完全支持的模组
以下模组拥有专用的集成代码和完全兼容性:
- Animania
- Armor Underwear
- Baubles
- Biomes O' Plenty (添加了对水生植物的兼容性)
- Dynamic Trees (添加了对流体方块的兼容性)
- DynamicSurroundings
- EnhancedVisuals
- First Aid
- Harvest Festival Legacy
- Inspirations
- Lycanites Mobs
- Ore Excavation
- Pam's HarvestCraft
- Potion Core
- Pyrotech
- Realistic Torches
- Rustic
- Serene Seasons
- Streams
- SurvivalTools
- Simple Camp Fire
- Traveler's Backpacks
- Tinkers' Construct
- The Betweenlands
- Weather2 Remastered
- HBM's Nuclear Tech Mod: Community Edition
额外兼容性
这些模组无需专用集成即可工作,但经过测试:
- Cave Generator (推荐用于生成泉水)
- Fluidlogged API
- Greenery (添加了对水生植物的兼容性)
希望与特定模组兼容? 请提交一个 Issue,我会尽力使其工作!
许可证与致谢
许可证
本项目根据 MIT 许可证分发
作者与贡献者
- Charles445: 创建了原始版本
- Teksturepako: 创建了 Underdog 分支
- 0xNull: 负责维护、更新至 RetroFuturaGradle、消除内存泄漏,并为 Reforged 的主要作者
支持
SimpleDifficulty Reforged
An improved SimpleDifficulty For Underdog fork
Overview
SimpleDifficulty brings a temperature and thirst system to Minecraft 1.12.2, based on the basic mechanics of survival mods like Tough As Nails. This maintained fork focuses on:
- Bug fixes and stability improvements
- Expanded mod compatibility for large modpacks
- Technical optimizations for smooth gameplay
- Code modernization and cleanup
Note on Project Origin:
This mod is the result of four months of continuous and dedicated development (from May to September). Since the optimizations and code refactoring are so extensive (more than 9,000 lines modified), I’ve decided to release this updated version separately so you can immediately benefit from the memory leak fixes and performance improvements. If you’d like to see a complete technical breakdown of all the changes, feel free to check out the original pull request
For a simpler, easier-to-understand list of changes, check out this file in the repository
Features
Core Mechanics
- Thirst System: Requires players to manage hydration levels to avoid negative status effects.
- Temperature Dynamics: Environmental biomes, blocks, and armor affect the player's temperature.
- Hypothermia & Hyperthermia: Now reduce max health and apply negative potion effects instead of dealing direct damage. (Note: Spice of Life's health modifier is ignored in the calculation).
- Water Variants:
- Regular Water: Standard hydration source.
- Saltwater: Increases dehydration rates if consumed.
- Purified / Spring Water: Safe, clean hydration with optimal saturation values. Vanilla water is now treated as spring water. (Note: The water itself must be generated using another mod. Cave Generator is recommended).
Refined Water & Item Systems
- Canteen Overhaul: Corrected durability logic and thirst replenishment scaling. Purified water consumption accurately updates items and sources.
- Bottle Interactions: Empty bottles dynamically detect specific environmental fluid types (Salt, Normal, or Spring water) rather than defaulting exclusively to vanilla water blocks.
- Consistent Smelting: Corrected cooking logic to prevent special fluid containers (like spring water bottles) from downgrading back to standard variants during processing.
- Recipe Sanitization: Removed redundant or broken shapeless recipes for canteens and filters to prevent crafting conflicts.
- Visual Adjustments: Fluid color rendering adapts organically based on biome locations, featuring customized depth fog settings.
- Enhanced Fog: Improved water fog visuals. The fog color is brighter now and changes depending on the biome.
- Customization: Added a new config option to make waters darker or brighter.
- Ice Mechanics: Added regular and salt water ice! 🧊 Generates natural ice structures in applicable environments. Includes a world generator for it, and implements melting, freezing, and Serene Seasons support. Fully compatible with freeze/melt block states.
Technical Optimizations
Designed specifically to reduce server overhead and client-side stuttering in large modpacks.
Memory Management
Leak Resolution
- Identified and closed memory leaks related to positional world tracking
- Fixed capability data not being properly released on player disconnect
- Optimized event handler registration to prevent duplicate listeners
Data Footprint
- Streamlined internal telemetry storage in the core temperature subsystem
- Reduced global memory usage by ~40% compared to original fork
- Implemented lazy loading for non-critical data structures
Processing Efficiency
Execution Gates
- Implemented early-exit logic across major processing loops
- Reduced unnecessary tick evaluations when tracking systems are inactive
- Added caching for frequently accessed calculations
Subsystem Tuning
- Optimized environmental water-block scanning algorithms
- Improved canteen consumption action performance
- Streamlined tick-by-tick thirst calculations
- Added salt/freshwater mixing logic with an optimized fill algorithm that doesn't affect performance.
- Removed particle effects from fluids and slightly improved performance for fluid rendering.
Garbage Collection
- Lowered object instantiation rates during standard gameplay loops
- Implemented object pooling for frequently created/destroyed objects
- Reduced overhead on Java Garbage Collector by ~60%
Mod Integrations
Fully Supported Mods
The following mods have dedicated integration code and full compatibility:
- Animania
- Armor Underwear
- Baubles
- Biomes O' Plenty (Added compatibility for aquatic plants)
- Dynamic Trees (Added compatibility for fluid blocks)
- DynamicSurroundings
- EnhancedVisuals
- First Aid
- Harvest Festival Legacy
- Inspirations
- Lycanites Mobs
- Ore Excavation
- Pam's HarvestCraft
- Potion Core
- Pyrotech
- Realistic Torches
- Rustic
- Serene Seasons
- Streams
- SurvivalTools
- Simple Camp Fire
- Traveler's Backpacks
- Tinkers' Construct
- The Betweenlands
- Weather2 Remastered
- HBM's Nuclear Tech Mod: Community Edition
Additional Compatibility
These mods work without dedicated integration but have been tested:
- Cave Generator (Recommended for generating spring water)
- Fluidlogged API
- Greenery (Added compatibility for aquatic plants)
Want compatibility with a specific mod? Open an issue and I'll try to make it work!
License & Credits
License
This project is distributed under the MIT License
Authors & Contributors
- Charles445: Created the original version
- Teksturepako: Created the Underdog fork
- 0xNull: Maintained, updated to RetroFuturaGradle, eliminated memory leaks, and lead author of the Reforged
Support
评论 0
登录后参与评分
还没有评论,来抢沙发吧