Closed Kamesuta closed 3 months ago
Thank you for your contribution! The idea to save chests during the world save is very interesting, I totally approve this 👍
Thank you for your review and for approving the idea!
But I have one question: do you think that deleting the context of players in the world during an automatic save can cause problems? (if they are interacting with their enderchest for example)
I have made some modifications to address this concern. Specifically:
I removed the saving of context during times other than world save. This is because saving context at other times can cause inconsistencies when items are added or removed from the ender chest, which can result in items being duplicated or lost. The best solution is to only save context during world save.
I modified the code to ensure that the container being used is dataized in the main thread to avoid inconsistencies. This addresses the concern you raised about potential issues arising when players interact with their ender chest while dataization is performed asynchronously. To do this, I first retrieve the container that the player has opened on the main thread, and then retrieve and serialize the other containers in a separate thread.
Replaced by #261 as I can't push to your branch
Description
Changes
Related Issues
Resolves #130
Checklist