ScheduledTickDispatcherLib
Library for creating unregisterable client and server tick events with dynamic lifecycles and delays
介绍
ScheduledTickDispatcherLib
ScheduledTickDispatcherLib is a lightweight library mod built on top of the Fabric API, providing a clean, secure, and memory-safe way to schedule ticking tasks in Minecraft.
Designed for mod developers, it allows you to register both immediate and delayed tasks that automatically unregister themselves upon completion (or allow you to unregister them manually) — eliminating memory leaks and ensuring optimal performance.
Features
- Tick Phases – Hook into precise lifecycle events (e.g.
START_SERVER_TICK,END_CLIENT_WORLD_TICK) for exact control. - Delayed Tasks – Schedule delayed executions that begin after a custom tick offset.
- Task Chaining – Utilities for chaining tasks together for serialized execution.
- Self-Cleanup – Tasks automatically remove themselves after completion to prevent memory bloat.
- Security Limits – Built-in caps on task registration per phase as well as limits to task duration and delays to avoid abuse and performance issues.
Installation
Add the library as a dependency via Maven:
repositories {
maven {
url "https://cursemaven.com"
}
}
dependencies {
//Change latest_version to version of the file you're downloading.
//Current latest is 6397403.
modImplementation "curse.maven:scheduledtickdispatcherlib-1236960:latest_version"
}
Then, refresh your project dependencies and you’re good to go!
Usage
ScheduledTickDispatcher contains rich javadoc all over the place, documenting every class and method, as well as an example mod in the repository. For more in-depth explanation to cover most use cases, please view the Wiki.
Built-in Security
To ensure stability and prevent abuse:
- A hard cap of 30 tasks per phase is enforced.
- Internal logging tracks misuse and provides context for debugging.
- Tasks unregister automatically when complete.
常见问题
ScheduledTickDispatcherLib 支持哪些 Minecraft 版本?
ScheduledTickDispatcherLib 支持 Minecraft Java 版 1.21–1.21.5,共 6 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
ScheduledTickDispatcherLib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
WhiteTowerGames 的其他作品
查看全部 →
Pedestals – Display your items!
用你找到的任意材料制作陈列台,在专属奖杯室里展示物品!
StrippableBlocks API
一个允许注册不带 axis 属性的去皮方块、绕过 Fabric API 相关要求的前置库。
Enchanted Vertical Slabs – Nemo’s Woodcutter compatch
Compatibility Patch for Enchanted Vertical Slabs and Nemo's Woodcutter
评论
登录后评论和评分