Lost items from a Create item vault after a restart, or after walking away and coming back? If the vault crosses a chunk border, this is why. This addon fixes it.
Fixes Create issue #4370. Not affiliated with the Create team. Please report bugs here.
What it fixes
A vault made of several blocks has one controller block. The controller joins the inventories of all the blocks into one big inventory and keeps it, so it doesn't rebuild it on every access. When a vault crosses a chunk border, the blocks in the other chunk can unload and load again on their own, for example when a player walks away or the server restarts. Each time, those blocks get a fresh inventory loaded from the save. The controller doesn't notice and keeps using the old one:
- Items put in disappear. Pipes, funnels, storage terminals and other mods put items into slots that belong to the old inventory, which is never saved again. This matches the reports: whole vaults emptied through a storage lectern or terminal, and only when the vault crosses a chunk border.
- Items taken out are duplicated. Items taken out come from the old copy, while the saved block still has them.
With this addon, the controller rebuilds its inventory whenever one of its blocks loads or unloads, so it always uses the blocks that are actually in the world.
Items that are already gone can't be brought back. The fix stops it from happening again.
Config
config/vault_item_loss_fix.properties: enabled.
If a Create update changes the code this addon hooks into, the fix switches itself off and logs a warning. It never stops your game from loading.
FAQ
Client or server? The server needs it (or your game, in singleplayer). Players don't need it to join.
Does it need anything else? Create 6.0 for Minecraft 1.21.1, on NeoForge.
How is it tested? Game tests build a two-block vault, then unload one block and load it again from its saved data, which is what a chunk reload does to it. Then they put 64 diamonds into that block's slots, and in a second test take 64 out. Without the fix, the 64 diamonds put in end up in no saved block, and the 64 taken out are still in the block as well. With the fix, all 64 land in the block, and taking them out empties it.
Why isn't this in Create: Fix Pack? It's about losing items, so it gets its own name, easy to find if you're searching for the problem.
Can I use it in my modpack? Yes, go ahead, no need to ask.
MIT. Developed with AI assistance. Source: https://github.com/traelmyx/create-vault-fix

