Skip to content

Outdated Structures

embeddedt edited this page Jun 4, 2023 · 2 revisions

Note: "mod" and "datapack" are interchangeable here.

While playing you may see a warning in your game log that says a mod is "shipping outdated structure files, which can cause worldgen lag".

Mods that add structures do so by including an NBT file with the structure data. Oftentimes when the mod is ported to a newer Minecraft version the same structure files are used. This works because Mojang designs the game to be able to upgrade old worlds, so the game will accept structure files from older versions without visible issues. However, the structure files need to be upgraded on-the-fly when they are loaded, which can cause some lag.

In vanilla, the upgrade process is repeated every time you launch the game. ModernFix mitigates this by caching and reusing upgraded versions of structures when it can. However, that still means a server-side lag spike the first time the structure is loaded if it needs to be upgraded. To mitigate this, you can run /modernfix upgradeStructures on your server/in a singleplayer world to have ModernFix load and validate every structure, generating an upgraded version if needed. Note that this command will completely freeze the server while it runs so don't use it while players are online.

As a modder: If your mod is marked as compatible with a given MC version, please ensure any .nbt files you ship with your mod are actually saved for/updated to that version to minimize worldgen lag for players. https://github.com/jaskarth/structure-fixer may help with this. More testing is needed to determine whether Mojang's DFU improvements in 1.19.4 have fixed this problem.