Vaults crossing chunk boundaries delete items when chunks containing them are (un)loaded
James103 opened this issue ยท 1 comments
Describe the Bug
When a vault crosses chunk boundaries and one of the chunks containing such a vault is unloaded, some of the items stored in that vault are deleted and/or the state of the items stored reverts to the last known save.
This can lead to mass voiding of valuable resources in large storage systems utilizing maximum-size vaults, as many such vaults will cross chunk boundaries. For example, a player inputs 1 million cobblestone into such a system, then leaves and comes back to find that only 500,000 cobblestone survived.
Reproduction Steps
- Create a new world.
- Place two vault blocks next to each other in different chunks to create a single vault.
- Place a smart chute on one of the vault blocks.
- Place a double chest on that chute.
- Fill the chest completely with stone.
- Wait until all stone has filtered through the chute into the vault. 41 stacks should be extracted (20 stacks in each of the two vault blocks, plus an extra stack in the chute).
- Save and reload the world.
- Fill the chest completely with stone again.
- Notice some more stone filters through, which can only be explained by the vault losing some of the items inside.
If the vault remains full even through a save and reload, one can try using a funnel to extract all items from said vault, then save and reload the world once it's empty. If after a reload additional items can be extracted, the vault's storage reverted to a previous state where it still had some items, which constitutes a duplication exploit.
Expected Result
Vaults should not delete or duplicate items when they are unloaded, even if they cross chunk boundaries.
Screenshots and Videos
Crash Report or Log
No response
Operating System
Windows 10, 64-bit
Mod Version
0.5.1f
Minecraft Version
1.20.1
Other Mods
fabric-api-0.92.1+1.20.1
NoChatReports-FABRIC-1.20.1-v2.2.2
(though NoChatReports-FABRIC-1.20.1-v2.2.2
should not matter in reproducibility)
Additional Context
No response