mojira.dev
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

Linked issues

MC-16358 Item duplication bug Resolved MC-19596 duplicate bonus chest Resolved MC-24546 Dupe using a chest in Singleplayer Resolved MC-151328 Item duplication 1.14 Resolved MC-154379 1.14.2 Item Dupe. Resolved

Comments 67

Just tried this, and managed to dupe a stack of diamonds and a stack of melons.

Alexander Hammett

I just tried it:
Threw a dozen diamond blocks on the ground, pressed esc then again, then force-closed the game.
When i reopened minecraft the items on the ground were invisible, but i was still able to pick them up. Interesting :/
(Running Mas OS X Mountain Lion btw)

Nathan Workman

As this has been in the game for a while I do not believe that this should not be considered a 1.4.1Pre bug. It is more a long standing bug than a bug which was a result of switching to 1.4.1Pre.

This glitch only works in 1.2.5 release, it was fixed

I tested it in 1.4.1Pre, and it worked there. As for what Nathan W. said, It's a bug that is still there, so it should be considered an ongoing bug in this version.

57 more comments

Can confirm in 1.20.5

Couldn't manage to confirm 24w37a

Minecraft386882

Can confirm in 1.21.4 

Minecraft386882

Affects 25w03a

Minecraft386882

Affects 25w20a

Marshall Bolwes

Mask3D_WOLF

(Unassigned)

Confirmed

Platform

Normal

Player

duplication, multiplayer, singleplayer

Minecraft 1.4.1, Snapshot 13w19a, Snapshot 13w21a, Minecraft 1.8.8, Minecraft 16w02a, ..., 24w40a, 1.21.4, 25w04a, 1.21.5, 1.21.6

Minecraft 1.4.5

Retrieved