[MC-697] Default singleplayer player data is always used for players opening world Created: 26/Oct/12 Updated: 27/Jan/24 |
|
| Status: | Reopened |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.2, Minecraft 1.4.6, Minecraft 1.7.4, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 1.7.10, Minecraft 14w32d, Minecraft 1.8.1-pre3, Minecraft 1.9.4, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2, Minecraft 1.11.2, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 1.13-pre6, Minecraft 18w30b, Minecraft 1.13.2, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, 1.14.4, 1.15.2, 20w13b, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 1.16.2, 1.16.4, 1.16.5, 21w06a, 21w07a, 21w08b, 21w11a, 21w14a, 1.17 Release Candidate 2, 1.17, 1.19.3, 23w03a, 23w04a, 23w05a, 23w06a, 1.20.4 |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Mask3D_WOLF | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 63 |
| Labels: | duplication, playerdata | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHK: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Category: |
Player
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mojang Priority: | Normal | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Area: | Platform | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
The bugFor singleplayer worlds the player data is written to the level.dat file as well (called "default player data" in the following) and always used when someone opens the world. This creates the following two unwanted situations. Cannot start with empty inventory in a world of someone elseBecause the default player data is always used you cannot play in the world of someone else with new player data but instead start where the player who last played left and have the same items. Default player data is used even if player data exists after playing in LANWhen you played in LAN before and an entry in the playerdata folder exists for a player the default player data is used anyways. Outdated default player data is used after loading world on a dedicated serverWhen a singleplayer world is loaded by a dedicated server and the default player data player joins, their playerdata entry is updated, but their default player data is not. Therefore when they load the world in singleplayer again, they have the old outdated player data. Possible solutionSee this reddit post for a discussion. Have the game perform these steps when loading a world:
WorkaroundKeep in mind that this is a bug tracker and not a discussion forum or a help desk. For questions, ask for example on reddit, the Minecraft Forum, or on other platforms.
The following steps require an NBT editor. Make sure it is up to date and supports changes to NBT structure introduced in the latest versions. You can use for example NBTExplorer version 2.8.0(+).
|
| Comments |
| Comment by Brain81505 [ 11/Feb/23 ] |
|
Can confirm in 23w06a |
| Comment by Brain81505 [ 01/Feb/23 ] |
|
Can confirm in 23w05a |
| Comment by Brain81505 [ 25/Jan/23 ] |
|
Can confirm in 23w04a |
| Comment by Brain81505 [ 18/Jan/23 ] |
|
Can confirm in 23w03a |
| Comment by Brain81505 [ 14/Jan/23 ] |
|
Can confirm in 1.19.3 |
| Comment by Zytron [ 07/Jun/21 ] |
|
I can confirm for 1.17 release candidate 2, Assuming this is what I experienced. I logged on to a world on my main account, logged off, and back on with my second account using the same PC. We shared inventories. I then hosted a LAN world on my main and joined the LAN world on my alt, the alt had the same inventory as it did before, therefore, I was able to dupe items an infinite amount of times with this as the alt account's inventory changed to my main's every time I logged on to it in singleplayer. when you log onto a world in single player the inventory becomes the same as the last time the world was loaded, regardless of which account. This allows for duplicating an entire inventory as many times as you want as long as you have 2 accounts open on the same device. Although if your looking to dupe items and your using LAN to do so, its easier to just turn on cheats with LAN and go into creative mode. |
| Comment by Flick Penrose [ 08/Mar/21 ] |
|
A while back somebody said they were self-assigning this, and I saw their name under "Assignee" but now it's back to "Unassigned." What gives? |
| Comment by [Helper] Jack McKalling [ 07/Mar/21 ] |
|
Yes, don't worry. |
| Comment by Flick Penrose [ 07/Mar/21 ] |
|
I've gotten many emails about new comments here, but when I come to the page they're gone – is a mod deleting them? |
| Comment by Noam Elul [ 04/Jan/21 ] |
|
Confirmed in 1.16.4. This bug was reported on the first day the issue tracker was open and still hasn't been fixed more than 8 years later. |
| Comment by pulpetti [ 06/Jul/20 ] |
|
Confirmed in 20w27a |
| Comment by [Helper] Jack McKalling [ 18/Oct/18 ] |
|
I experienced this too, when I opened my world to lan, and later opened it under their account. From the description I understand this really is a bug, I imagined it might just be intended how the world is saved between single/multiplayer. I hope this gets fixed somehow sometime! |
| Comment by Marcono1234 [ 17/Sep/18 ] |
|
@SkippyMitch, I added a workaround to the description. This should hopefully work. |
| Comment by Mitchell Brown [ 16/Sep/18 ] |
|
I will try again, but someone said that when launching the world the default (single player) host data will overwrite the UUID playerdata file. |
| Comment by Fabian Röling [ 16/Sep/18 ] |
|
From what I can see, it should work. Try it with two non-hosting inventories (A hosts LAN world, B and C join, you swap B and C). |
| Comment by Mitchell Brown [ 16/Sep/18 ] |
|
Fabian, I have tried swapping the filenames (UUIDs?) of the two .DAT files within the /playerdata folder - this did not work, should it have? what file would i need to delete?
|
| Comment by Fabian Röling [ 16/Sep/18 ] |
|
Yes, just delete the inventory. Or, if you want to preserve the players' inventories, you have to move the inventories into the folders for the correct UUIDs. |
| Comment by Mitchell Brown [ 16/Sep/18 ] |
|
Is there even a workaround for this? Like if I find the default player data and remove it before loading the world? Trying to swap host machines for a LAN hosted world. 1.12.2 |
| Comment by Irritated Gamer [ 21/Jan/18 ] |
|
Is there a ticket for this issue for Bedrock Edition? I can;t find it when I search but I'm having this issue too but for MCPE. It makes it difficult for the host to transfer to another host. (like if your device can't handle it anymore or something) It opens the world as you and not the other player (who already has playerdata for that world). |
| Comment by Mick [ 09/Jan/18 ] |
|
Still an issue in 1.12.2 LAN. Affected ender chest, location, armour, inventory. When a second player opens tge world in single player mode they are given the first player's stuff. Also overwrote player 2 advancements. |
| Comment by [Mod] Michael Wobst [ 02/Jan/17 ] |
|
marcono1234: aye, sounds better to me. |
| Comment by Marcono1234 [ 02/Jan/17 ] |
|
Would the title "Opening singleplayer world uses default player data even if playerdata for user exists after playing in LAN before" describe this bug better? That is based on |
| Comment by Fabian Röling [ 25/Jun/16 ] |
|
I don't think so. As far as I understand it, if you play in a SP world, the last saved inventory or the standard one or whatever gets copied to something linked to your UUID inside the saves folder. If that wouldn't happen, but it would just use the standard one while playing and also for the host in a LAN world, the inventories for UUIDs that get used on the LAN server would work normally and don't interfere with the normal SP playing. When it gets opened in LAN again later, there are the per-UUID inventories again ready to use. |
| Comment by husky2490 [ 25/Jun/16 ] |
|
For all we know, the fix could come whenever Jeb, Dinnerbone, Grumm, or someone else decides to change the save format, which might be a while |
| Comment by Fabian Röling [ 22/Jun/16 ] |
|
Confirmed for 1.10.1. |
| Comment by Fabian Röling [ 09/Jun/16 ] |
|
Confirmed for 1.10. |
| Comment by Galaxy_2Alex [ 24/Oct/14 ] |
|
Reopened, thanks. |
| Comment by a [ 24/Oct/14 ] |
|
Yup it's there in 1.8.1-pre3 |
| Comment by Chris Allen [ 01/Oct/14 ] |
|
There are at least a half dozen bug reports on this issue, going back at least to v1.4.6. All of them have been marked "Duplicate" except |
| Comment by a [ 08/Aug/14 ] |
|
Affects 1.7.10 & 14w32d. Also, could anyone with the ability change the title of this ticket to reflect the broader nature of the bug? You don't need Ender Chests at all to see this. I'm kind of surprised this ticket hasn't gotten more attention. It's essentially game-breaking for groups of 2 or more who only own 1 computer, but still want to collaborate. |
| Comment by [Mod] Ezekiel (ezfe) [ 25/Jul/14 ] |
|
Is this still a concern in the latest Minecraft version 14w30c? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by [Mod] Ezekiel (ezfe) [ 24/Feb/14 ] |
|
Ok |
| Comment by Lucas Ribeiro [ 22/Feb/14 ] |
|
I don't know if the Reporter of the bug will update the post, but I tested it and THIS IS STILL A PROBLEM IN THE LATEST SNAPSHOT. |
| Comment by Lucas Ribeiro [ 05/Jan/14 ] |
|
Please send this to Dinnerbone so he fixes it. Yes it is a problem in 1.7.4 and it ruined my experince with my sister. I got really sad that it hapenned, does anyone knows how she can access her ender chest again? |
| Comment by Jacob D'Agostino [ 02/Jan/14 ] |
|
Can confirm that this is an issue in 1.6.4 and 1.7.4 both. |
| Comment by [Mod] CubeTheThird [ 26/Sep/13 ] |
|
Is this still a concern in the current Minecraft version 1.6.4 / Launcher version 1.2.5 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Jesper the End [ 04/Jul/13 ] |
|
hmm... if the player that logged in was called 'player' then it would make a bit sense, then you would use all the properties from the level.dat but in your case it's just weird |
| Comment by Tim Gunderson [ 03/Jul/13 ] |
|
@Jesper Unlike your issue, the Minecraft servers were fine. The thing that caused this was player 2 logging on to player 1's machine and loading this world, which copied player 1's .dat file (possibly from the level.dat instead of "player1".dat or "player2".dat as you mentioned) and replaced player 2's permanently. Until opened to LAN, there is no one to see what another player is called, so I don't have the answer to your question. |
| Comment by Jesper the End [ 03/Jul/13 ] |
|
so... the player that logged in wasn't just called 'player' ? |
| Comment by Tim Gunderson [ 02/Jul/13 ] |
|
Yes, this is still a concern with LAN play. (edit: And it concerns all facets of a character to include inventory and enderchests, despite the title) When a player with a different username logs into Minecraft from my computer and pulls up the world we play together: her inventory, location, enderchest, etc. are all replaced with the original 'main character' values, which then overwrite her .dat file. I thought that was strange, because she already had a .dat file, but the game rewrote her to be me. (We lost a ton of enchanted armor she had just made, and duped several silk touch items I had this way. To top it all off, because I was mapping, she ended up displaced about 5km.) edit: This was around 13w25a (Sorry to not have exact; it was after zombie AI changes and before 1.6 pre-release, but I haven't seen anything regarding SSP/LAN save structure in patch notes, so I bet it's still in live). |
| Comment by Tails [ 28/Mar/13 ] |
|
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Jesper the End [ 15/Feb/13 ] |
|
I've seen this once, but that was because the minecraft servers were down and player two was called 'player' that's why he will get the same NBT data from the level.dat instead of it's own player.dat |
| Comment by Michael [ 19/Nov/12 ] |
|
Confirmed,only in LAN not multiplayer, they should make separate inventories for lan worlds and separate EnderChests. |
| Comment by [Mod] Ezekiel (ezfe) [ 26/Oct/12 ] |
|
This is somewhat serious, however I can not confirm because I don't have access to a copy of Minecraft at the moment. It makes sense, however. |