SparkyAPI
一个用于 SparkNox 模组的轻量级客户端库。SparkyAPI 本身不添加任何功能——它为其他 SparkNox 模组(如 ZoroCrystal)提供共享的基础架构(包括配置处理、事件钩子、HUD 渲染、按键绑定管理和实用工具函数)。
如果你曾使用过 Fabric API、Cloth Config 或 PlaceholderAPI,你就已经明白其理念——只需安装一次,所有依赖它的模组即可正常运行。
包含内容:
- 配置系统 —— 将 JSON 配置保存到
.minecraft/config/sparky/ 目录中,若文件尚不存在则使用合理的默认值。
- 事件总线 —— 共享的刻事件(
PLAYER_TICK、CLIENT_TICK),使依赖模组无需各自注册监听器。
- HUD 辅助工具 —— 无需繁琐代码即可注册持久的屏幕文本行、绘制方框、带边框的面板以及带阴影的文本。
- 按键绑定管理器 —— 通过单次调用注册按键绑定,并自动处理按下逻辑。
- 实用工具集 —— 常见辅助功能,如在快捷栏/物品栏中查找物品、检查延迟、距离计算等。
SparkyAPI 基于 Fabric 1.21.4 构建,仅限客户端使用,自身不会对游戏玩法产生任何影响。它的存在纯粹是为了让依赖模组更轻量、更一致且更易维护。
如果某个模组提示你需要 SparkyAPI,那就是它了。 ?
SparkyAPI
A lightweight client-side library for SparkNox mods. SparkyAPI doesn't add features on its own — it provides the shared backbone (config handling, event hooks, HUD rendering, keybind management, and utility functions) that other SparkNox mods like ZoroCrystal build on top of.
If you've ever used Fabric API, Cloth Config, or PlaceholderAPI, you already get the idea — install it once, and every mod that depends on it just works.
What's inside:
- Config system — saves and loads JSON configs to
.minecraft/config/sparky/, with sane defaults if a file doesn't exist yet.
- Event bus — shared tick events (
PLAYER_TICK, CLIENT_TICK) so dependent mods don't each register their own listeners.
- HUD helper — register persistent on-screen text lines, draw boxes, outlined panels, and shadowed text without boilerplate.
- Keybind manager — register keybinds with a single call and handle press logic automatically.
- Utility belt — common helpers like finding items in your hotbar/inventory, checking ping, distance calculations, and more.
SparkyAPI is built for Fabric 1.21.4, is client-side only, and has no gameplay impact by itself. It exists purely to keep dependent mods lighter, more consistent, and easier to maintain.
If a mod tells you it needs SparkyAPI, this is the one to grab. ?
评论 0
登录后参与评分
还没有评论,来抢沙发吧