介绍
中文介绍正在准备中,下面暂时显示原文。
Datafly
A shared async I/O library for Fly’s Minecraft mods providing centralized, high-performance disk persistence.
Features
- One shared thread pool across all mods — no wasted threads, no duplicated I/O code
- Write data from any thread and get a result via DataTask — no blocking, no callback hell
- Read-your-writes guarantee — reads always return the latest submitted value even before it hits disk
- Coalesces burst writes to the same key — only the last value in a time window actually writes to disk
- Atomic writes via tmp → fsync → rename — no half-written or corrupted files on crash
- Emergency gzip compression when buffer memory runs low — trades CPU for heap headroom
- Spill oversized writes to a temp spool directory instead of blocking or dropping data
- Crash recovery — leftover spool files are re-drained to their destinations on next startup
- Pluggable codec system — JSON, NBT, TOML, YAML, raw bytes, or bring your own
- Per-mod writer configuration — each mod controls its own heap limit, codec, coalesce window, and cache size
- Optional LRU read cache — skip disk entirely for hot keys
- update() — atomic read-modify-write with the write lock held for the full cycle
- computeIfAbsent() — create-or-update in one atomic call
- World-agnostic — works from the main menu, client-side, dedicated server, anywhere
常见问题
DataFly Lib 支持哪些 Minecraft 版本?
DataFly Lib 支持 Minecraft Java 版 1.20.1–1.20.6,共 6 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
DataFly Lib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
FlyInMyEye 的其他作品
查看全部 →
Fly’s config lib
by FlyInMyEye, Fungus_Bug
Simplest JSON config lib to not repeat yourself :P
2,860
3 个月前
Modrinth
Fly’s config lib
by FlyInMyEye, Fungus_Bug
Simplest JSON config lib to not repeat yourself :P
2,860
3 个月前
Modrinth
Adrenaline
by FlyInMyEye, Fungus_Bug
Generation multithreading, but better
1,973
5 天前
Modrinth
Adrenaline
by FlyInMyEye, Fungus_Bug
Generation multithreading, but better
1,973
5 天前
Modrinth
评论
登录后评论和评分