Harium | 通用优化
通过智能代码替换实现高效性能
什么是 Harium
Harium 是一个通用优化模组(基于 Lithium),它用更快、更智能的实现方式重写低效的原版代码,且不改变游戏行为。
相同的游戏体验。更好的性能。
Harium 针对 Minecraft 中 CPU 密集型最高的系统:实体处理、红石、AI、漏斗和物理机制——将缓慢的算法替换为产生相同结果的优化替代方案。
优化类别
每个类别均可单独启用或禁用。
- AI & 寻路:更快的方块类型查找、优化的 POI 搜索、移除无用行为
- 实体系统:基于区块的移动追踪、优化的碰撞检测、更智能的物品合并
- 方块与红石:优化的红石导线电力计算、非活跃图块的 BlockEntity 休眠
- 漏斗与背包:事件驱动的漏斗逻辑并引入缓存——仅在背包实际发生变化时扫描漏斗
- 内存分配:在热点代码路径中使用 FastUtil 集合消除不必要的对象创建
- VoxelShapes:专为更快碰撞检测和射线追踪设计的形状实现
- 集合类:在整个代码库中将标准 Java 集合替换为优化的 FastUtil 替代方案
关键技术方法
- 事件驱动架构:方块区块仅在发生变化时通知监听器,而非每tick轮询
- 缓存层:为方块状态、实体位置和背包内容提供多级缓存
- 智能迭代:按区块顺序遍历实体,以提高 CPU 缓存局部性并支持提前终止
- 减少锁竞争:使用基于数组的数据跟踪条目替代同步映射
分支信息
Harium 是 Lithium 的一个分支,原版由 jellysquid3 开发。
兼容性:旨在完全兼容原版行为。不改变游戏玩法。
致谢与支持
原版 Lithium 由 jellysquid3 创建并由社区维护。
Harium 通过额外的改进扩展了优化覆盖范围。
加入社区
在我们的 Discord 获取帮助和更新。
加入 DISCORD
Harium - 由 Hari 维护 - 高性能 Minecraft
本项目描述由 AI 辅助编写。
Harium | General Purpose Optimization
Smart Performance Through Intelligent Code Replacement
What Is Harium
Harium is a general-purpose optimization mod (based on Lithium) that rewrites inefficient vanilla code with faster, smarter implementations — without changing game behavior.
Same Game. Better Performance.
Harium targets the most CPU-intensive systems in Minecraft: entity processing, redstone, AI, hoppers, and physics — replacing slow algorithms with optimized alternatives that produce identical results.
Optimization Categories
Each category can be individually enabled or disabled.
- AI & Pathfinding: Faster block type lookups, optimized POI searches, removed useless behaviors
- Entity System: Section-based movement tracking, optimized collision detection, smarter item merging
- Block & Redstone: Optimized redstone wire power calculations, BlockEntity sleeping for inactive tiles
- Hopper & Inventory: Event-driven hopper logic with caching — hoppers only scan when inventories actually change
- Memory Allocations: Eliminates unnecessary object creation in hot code paths using FastUtil collections
- VoxelShapes: Specialized shape implementations for faster collision detection and ray tracing
- Collections: Replaces standard Java collections with optimized FastUtil alternatives throughout
Key Technical Approaches
- Event-Driven Architecture: Block sections notify listeners only when changes occur, instead of polling every tick
- Caching Layers: Multiple levels of caching for block states, entity positions, and inventory contents
- Smart Iteration: Chunk-ordered entity iteration for better CPU cache locality and early termination
- Reduced Locking: Array-based data tracker entries instead of synchronized maps
Fork Information
Harium is a fork of Lithium by jellysquid3.
Compatible: Designed to be fully compatible with vanilla behavior. No gameplay changes.
Credits & Support
Original Lithium created by jellysquid3 and maintained by the community.
Harium extends the optimization coverage with additional improvements.
Join the Community
Get help and updates on our Discord.
JOIN DISCORD
Harium - Maintained by Hari - High Performance Minecraft
This project description was prepared with AI assistance.
评论 0
登录后参与评分
还没有评论,来抢沙发吧