跳到正文

Structure DFU Cache

作者:THE_cattail

Moves repetitive structure DataFixerUpper (DFU) migration to the startup phase and caches the result to improve TPS during heavy chunk loading.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Structure DFU Cache

Moves repetitive structure DataFixerUpper (DFU) migration to the startup phase and caches the result to improve TPS during heavy chunk loading.

How it works

  • Uniformly parses server structure resources during game startup or reload.
  • Provides and caches processed structures through a vanilla-compatible resource pack layer.

Configuration

Starting in 1.2.0, processing limits can be configured in config/structure_dfu_cache.toml and are loaded on game startup (restart the game after editing):

# Maximum decoded NBT memory quota in MiB (tracks NBT decoder accounting of NBT objects and allocation overhead)
maxDecodedNbtMiB = 1024

# Maximum compressed structure resource size in MiB
maxCompressedResourceMiB = 64
  • Both options must be positive integers in MiB.
  • maxDecodedNbtMiB tracks the NBT decoder’s accounting of in-memory NBT objects and allocation overhead during processing (does not measure total DFU memory).
  • Worker concurrency is estimated based on available heap after deducting resident memory and a 2 GiB reserve, budgeting roughly 4x maxDecodedNbtMiB per worker (capped at 4 threads, leaving 1 CPU core free when more than 1 core is available). Higher quota values reduce parallel workers to allocate more headroom for conversion.
  • When compressed resource size exceeds maxCompressedResourceMiB, startup pre-processing is skipped and handed back to vanilla structure reading. When decoded NBT exceeds maxDecodedNbtMiB or conversion fails, raw compressed bytes are cached as unoptimized resources and retried during subsequent load or reload.

Requirements

Install the following mod as a dependency:

  • RinLib

常见问题

Structure DFU Cache 支持哪些 Minecraft 版本?

Structure DFU Cache 支持 Minecraft Java 版 1.20.1–26.2,共 4 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

Structure DFU Cache 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

THE_cattail 的其他作品

查看全部 →