Shaolib Core
Shaolib Core 是一个 NeoForge 库模组,为重度模拟类模组提供高性能区块缓存、快速世界查询工具以及轻量级投射物框架。
高性能区块缓存
Shaolib Core 维护着紧凑且易于查询的区块数据快照,以便其他模组能够采样方块、高度和缓存的世界状态,而无需反复遍历实时世界数据。其缓存 API 提供了新鲜度和来源信息,允许调用方区分实时世界读取、内存缓存命中、过期的缓存结果以及不可用的数据。
这使得它在需要每刻执行大量世界查询的系统(如射线检测、碰撞检查、地形感知模拟、引导逻辑、服务端预测等)中非常有用。
投射物框架
Shaolib Core 还包含一个灵活的投射物运行时,用于构建高级投射物系统。它没有强制要求将每个投射物都建模为标准的 Minecraft 实体,而是提供了轻量的投射物实例,具备类型化状态、运动模型、同步数据、服务端上下文、扫掠/碰撞辅助函数以及区块加载策略钩子。
附加模组可以基于这个共享的运行时构建自己的投射物行为:生成、刻更新、穿越世界进行扫掠、向客户端同步状态以及解析方块或实体命中,都可以使用相同的基础设施,同时每个投射物保留其独立的游戏玩法逻辑。
面向模组开发者
Shaolib Core 主要是一个依赖项/库模组。单独运行时,它侧重于基础设施而非大量的玩家可见内容。其他模组可以利用它来实现高速弹药、自定义射线检测、物理体交互、基于缓存的地形查询以及其他对性能敏感的模拟功能。
Shaolib Core
Shaolib Core is a NeoForge library mod that provides a high-performance chunk cache, fast world-query utilities, and a lightweight projectile framework for simulation-heavy mods.
High-performance Chunk Cache
Shaolib Core maintains compact, query-friendly snapshots of chunk data so other mods can sample blocks, heights, and cached world state without repeatedly walking live world data. Its cache APIs expose freshness and source information, allowing callers to distinguish live-world reads, memory-cache hits, stale cached results, and unavailable data.
This makes it useful for raycasts, collision checks, terrain-aware simulation, guidance logic, server-side prediction, and other systems that need many world queries per tick.
Projectile Framework
Shaolib Core also includes a flexible projectile runtime for advanced projectile systems. Instead of forcing every projectile to be modeled as a normal Minecraft entity first, it provides lightweight projectile instances with typed state, motion models, synchronized data, server-side contexts, sweep/collision helpers, and chunk-loading policy hooks.
Addon mods can build their own projectile behavior on top of this shared runtime: spawning, ticking, sweeping through the world, syncing state to clients, and resolving block or body hits can all use the same infrastructure while each projectile keeps its own gameplay logic.
For Mod Developers
Shaolib Core is primarily a dependency/library mod. On its own, it focuses on infrastructure rather than large amounts of player-facing content. Other mods can use it to implement high-speed munitions, custom raycasts, physics-body interactions, cache-backed terrain queries, and other performance-sensitive simulation features.
评论 0
登录后参与评分
还没有评论,来抢沙发吧