
Backpack state is not reset when entering a world without reboot after restoring from backup
Closed this issue · 3 comments
Your GTNH Discord Username
kohta
Your Pack Version
2.8beta4
Your Server
SP
Java Version
Java 21
Type of Server
Single Player
Your Expectation
Force manual backup with /backup start, remove item from backpack, restore backup, load into backup, item is missing from inventory and is in backpack
The Reality
The item is neither in the inventory nor the backpack, with the backpack state not having changed with the restoration
Global restore does not work either
This also works if you die then restore a backup, the backpack will be missing after restoring
Your Proposal
Ensure backup restorations always restore backpack state from the ModdedNetwork mod
Final Checklist
- I have searched this issue tracker and there is nothing similar already. Posting on a closed issue saying the bug still exists will prompt us to investigate and reopen it once we confirm your report.
- I can reproduce this problem consistently by follow the exact steps I described above, or this does not need reproducing, e.g. recipe loophole.
- I have asked other people and they confirm they also have this problem by follow the exact steps I described above, or this does not need reproducing, e.g. recipe loophole.
I confirm that it is already present in 2.7.4. Even with an automatic backup.
It can also duplicate items. If, at the moment of the backup, the item is in the player’s inventory, and then before the restore the item is placed in the backpack, after the restore the item will be back in the inventory but it will also remain in the backpack.
The backpacks are saved during backups. They are stored in the backpacks
folder in the world save dir. The problem is that if you keep the game running while restoring the backup and reenter the world, the mod doesn't reload the backpack files.
If you you restart the game when restoring from backup (before entering the restored save again), you get the old backpack inventory as expected.
I'm guessing this is caused by GTNewHorizons/Minecraft-Backpack-Mod#12