topeatLib
一个 Forge 实用库,为我的模组和 12Tae12 的模组提供通用的基础设施。
包含内容
- 数学工具:几何、插值、噪声生成以及通用数值计算辅助函数。
- 集合类:当原版提供的数据结构不够用时,可使用的专用数据结构。
- 并发工具:用于并行工作负载的线程原语。
- 事件基础设施:轻量级自定义事件管道分发机制。
- 网络辅助:数据包序列化和通道管理。
- 更多功能:反射工具、对象池、版本控制、异步执行、计时器等。
为什么不直接阴影化(shadow)或在每个模组中重新实现?
如果你曾经发现自己在多个模组之间复制粘贴相同的实用类,你就会明白这一点;如果不曾如此,不妨尝试制作三个不同的 Minecraft 模组,相信我,那会很有趣。topeatLib 就是那个集中的中间层。将其作为依赖项放入你的 mods 文件夹即可!而且它也很轻量。至于阴影化,我也不太确定,我更倾向于让它作为外部依赖存在。
该库仅需要加载器及其依赖!(Java 17+、Minecraft 等。)
许可证
12Tae12 保护性许可证,详见 此处。
topeatLib
A Forge utility library providing common infrastructure for my mods and 12Tae12 mods.
What's inside
- Math stuff geometry, interpolation, noise generation, and general number-crunching helpers.
- Collections specialized data structures for when vanilla's offerings don't quite cut it.
- Concurrency tools threading primitives for parallel workloads.
- Event infrastructure lightweight dispatching for custom event pipelines.
- Networking helpers packet serialization and channel management.
- And more reflection utilities, pooling, versioning, async execution, timing.
Why not just shadow it or remimplement it per mod?
If you've ever found yourself copy-pasting the same utility class across a bunch of mods, you'll understand, if not, try to make 3 different Minecraft mods, trust me, it's fun. topeatLib is the centralised middleman. Drop it in your mods folder as a dependency, and that's it! Oh, it's light too. As for shadowing it, I don't really know, I'd prefer it as external.
This only requires the modloader and it's dependencies! (Java 17+, Minecraft, etc.)
License
12Tae12 Protective License, see here.
下载 topeatLib
下载 topeatLib
下载 topeatLib
下载 topeatLib
下载 topeatLib
- 添加了多加载器支持。
- MainThreadQueue.drain 在大预算时发生溢出
- 更新了许可证
- MainThreadExecutor.DIRECT 声称所有线程都是主线程,导致 ThreadGuard 失效
- 各种改动
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧