Mojira Archive
MC-63

Player data and region files not written/saved to disk simultaneously, causing item loss/duplication

The bug

Due to player data and region files not written to disk simultaneously, items can be duplicated quite easy under certain conditions. As of 1.16, Minecraft can be configured to run in synchronous disk i/o mode, making this issue more obvious and easier to reproduce.

How to reproduce

  1. Make sure syncChunkWrites in options.txt is set to true
  2. Create a world and fill your inventory with things
  3. Leave the world to make sure player data gets written to disk
  4. Rejoin the world
  5. Die
  6. Forcefully terminate minecraft's java process (Taskmanager, /taskkill, ...)
  7. Rejoin the world
    Notice things you've collected now appear on the ground and in your inventory

Video demonstrating the issue (potentially outdated regarding reproduction): https://youtu.be/0RYRj5XN8vk?t=25s