Structure DFU Cache
Eliminates repeated Minecraft structure DataFixerUpper (DFU) conversions during world loading and /reload by pre-upgrading legacy structure NBT templates once into a single-layer overlay cache — with sub-5ms zero-read warm startups, a live native health dashboard, and zero external dependencies.
Highlights
- Sub-5ms warm-boot fast path: Validates line 1 of
cache/structure_dfu_cache/manifest.v2againstPackFingerprint(active pack stack + mod files + datapack metadata) without reading or decoding a single NBT file. - Single-layer overlay (
overlay/data/<ns>/<path>): Only materializes structure templates withDataVersion < targetDataVersion. Current-version, non-template, corrupt, and oversized (>32 MiBdecoded />64 MiBcompressed) files are recorded asP(passthrough) with zero disk writes. - Heap-safe & process-safe: Adaptive
1–4worker concurrency (automatically throttled to1worker when-Xmx <= 6.8Gor heap headroom< 2.5G),prepare.lockcross-process lock, orphan file pruning, and automatic cleanup of legacy1.xcache directories (blobs/,sources/,generations/,index.json). - Native Config & Health Dashboard: Built-in zero-dependency screen accessible via Mod Menu (Fabric), Forge, and NeoForge. Displays live/on-disk status, last prepare time (
ms), accelerated/passthrough counts,overlay/disk usage, hot-save toggles, and a one-click Clear Cache button. - Server OP Diagnostics: Native Brigadier
/structuredfucache statusand/structuredfucache clear(permission level 2), completely invisible to non-OP players. - Zero External Dependencies: Pure single JAR (
< 100 KB), no Fabric API, no Cloth Config, no library mods required. - 4-Language Localization: English (
en_us), Simplified Chinese (zh_cn), Traditional Chinese (zh_tw), Japanese (ja_jp).
Supported Matrix (8 Targets)
| Minecraft | Fabric | Forge | NeoForge | Java |
|---|---|---|---|---|
1.20.1 |
Yes | Yes (47.4+) |
— | Java 17 |
1.21.1 |
Yes | — | Yes (21.1+) |
Java 21 |
26.1.2 |
Yes | — | Yes (26.1.2+) |
Java 25 |
26.2 |
Yes | — | Yes (26.2+) |
Java 25 |
Configuration
Generated automatically at config/structure_dfu_cache.toml (also editable in-game via the native Config Screen):
# Master switch. When false, bypasses the overlay and uses vanilla resources directly.
enabled = true
# Maximum worker threads during cold/incremental cache builds.
# 0 = auto-adaptive (1..4 based on JVM heap headroom); 1..8 = explicit cap.
maxWorkers = 0
# When true, logs extra build diagnostics at INFO level.
verboseLogging = false
OP Commands
Requires permission level 2 (gamemaster / operator):
/structuredfucache status— Shows current mount mode, last prepare duration, accelerated/passthrough counts,overlay/disk size, and worker setting./structuredfucache clear— Clearscache/structure_dfu_cache/so the overlay rebuilds on the next world load or/reload.
Safety Limits
| Limit | Value |
|---|---|
| Max compressed structure size | 64 MiB |
| Max decoded NBT size | 32 MiB (NbtAccounter cap) |
| Default worker budget | 1 when -Xmx <= 6.8G or headroom < 2.5G, else 2–4 |
Compatibility
- Works alongside Lithium, ModernFix, C2ME, FerriteCore, and LazyDFU without overlap.
- Removing the JAR leaves vanilla worlds untouched;
cache/structure_dfu_cache/can be deleted safely at any time while the game is stopped.
License
GPL-3.0-or-later. See LICENSE.
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧