Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-267352

Singleplayer worlds don't load the player.dat when the "Player" tag is absent from level.dat


    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.5 Pre-Release 2
    • 1.20.4, 24w11a
    • None
    • Community Consensus
    • Save Data
    • Important
    • Platform

      To replicate:

      1. Start a new world in Creative mode.

      2. Give yourself any items and then leave the world.

      3. Access the level.dat of that world and delete the "Player" compound tag. (This can be done using an application such as NBTExplorer)

      4. Delete the level.dat_old (though this doesn't seem to impact anything that already isn't affected)

      5. Reload the world.

      Expected outcome:

      The player data should be loaded from the player.dat file located in the playerdata world folder (world/playerdata/<uuid>.dat) and retain the items given shortly before closing the world. But it will fail to load and result in the player spawning at 0, 0, 0 and a completely blank slate, likely inside solid blocks.

      This usually is for converting a multiplayer world into a singleplayer world, such as from a server to a singleplayer world - this is what I'm currently trying to do. The problem can be circumvented by simply copying over every tag individually within the compound player tag but that's not really convenient especially when I want to send this world to friends so they can continue the world on their end too.

      I have tested this in 1.19.4 and it works completely fine, so I can only imagine this is a bug in a recent update.

            gegy1000 [Mojang] Gegy
            anabolic_veemo Consumetheoats
            2 Vote for this issue
            3 Start watching this issue