Lost inventory Help!

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Dentvar

New Member
Jul 29, 2019
678
0
0
Hi guys,

I played on a server but I had to change to SP at the end.
I got a World download of the map and played with it today.
Cheats are not enabled on the map so I opened it to LAN and enabled cheats to get my self OP.

Now I closed the game reentered and spawned with blank inventory. I don´t know why. My Player Name is still the same and if I cheat myself a Thaumonomicon It did safe my progress.
SO I have no idea why this happened and how I can get it back.
I even inserted the files with my name on from the last backup. The ones of the Player data. But nothing.
 

Dentvar

New Member
Jul 29, 2019
678
0
0
No one a Idea?
Could someone explain me at least where the inventory data is saved?
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
You didn't even wait a day for a response?

Anyway... in answer to your question, your inventory is saved in your player.dat file.
On servers, this is stored in the playerdata folder with <yourUUID>.dat

So if your UUID was 000-000-000 then there'd be a file in there called 000-000-000.dat
You want to find your UUID and then make sure there is a UUID that corresponds to that, as a server which is run in offline mode doesn't use your UUID, it uses your username (or something like that)... I can't remember how it works exactly, but that is the general gist.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
I believe reading somewhere that the client uses the reads and writes the level.dat and only writes the playername.dat
where as the server reads and writes from the playername.dat only.

if I remember this correctly then this means that client->server goes without a problem but server->client can cause this sort of problems.

If you have the original player.dat file you might be able to copy the inventory data to the level.dat but I have no idea how you could do that.
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
I believe reading somewhere that the client uses the reads and writes the level.dat and only writes the playername.dat
where as the server reads and writes from the playername.dat only.

if I remember this correctly then this means that client->server goes without a problem but server->client can cause this sort of problems.

If you have the original player.dat file you might be able to copy the inventory data to the level.dat but I have no idea how you could do that.
I don't think inventory is stored in level.dat, as that is only level stuff... though I may be wrong.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
the reason why I think this is that people who's level.dat got corrupted and/or deleted and fix it by replacing it are now at a random location without inventory.

That being said I also said
I believe reading somewhere
 

McJty

Over-Achiever
Mod Developer
May 13, 2014
2,015
2,519
228
twitter.com
I don't think inventory is stored in level.dat, as that is only level stuff... though I may be wrong.

Actually level.dat *does* contain the inventory of the player and has not much to do with levels. It is probably one of the worst named files in Minecraft :)
 
  • Like
Reactions: Padfoote

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
Actually level.dat *does* contain the inventory of the player and has not much to do with levels. It is probably one of the worst named files in Minecraft :)
So I was right about it then? What is it used for on servers then?
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
Actually level.dat *does* contain the inventory of the player and has not much to do with levels. It is probably one of the worst named files in Minecraft :)
Oh yeah, it's the rca's that do the level *facepalm*
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
Now that we established where the inventory is stored maybe talk about a way to get the inventory back?
 

ScottulusMaximus

New Member
Jul 29, 2019
1,533
-1
1
If he still has access to the server log in, dump everything into a chest, save and download world. Sorted.

OR create a new server, load up the world and as above

If neither are an option, NBTedit happy fun times.
 

Dentvar

New Member
Jul 29, 2019
678
0
0
I got the full server download and the full world download. The funny thing about this was that after using the world in Singelplayer it acctualy saved my inventroy. So I don´t know why later it got currupted.
I will try in a few hours if what @jordsta95 said works. since I only rerolled the "UserID.dat"

I will let you know as soon as I come home from work. Sorry for beeing so anoyying at the start. But not having the inventory is actually a bad thing if you have it all full.

I¨m not scared of cheating the stuff back in, but remembering what I had there is the other topic :)
 

jordsta95

New Member
Jul 29, 2019
5,056
-4
1
I got the full server download and the full world download. The funny thing about this was that after using the world in Singelplayer it acctualy saved my inventroy. So I don´t know why later it got currupted.
I will try in a few hours if what @jordsta95 said works. since I only rerolled the "UserID.dat"

I will let you know as soon as I come home from work. Sorry for beeing so anoyying at the start. But not having the inventory is actually a bad thing if you have it all full.

I¨m not scared of cheating the stuff back in, but remembering what I had there is the other topic :)
Well in the <your UUID>.dat there will be all the information about where you were, how hungry you were, what you were wearing, what was in your inventory, any potion effects applied to you, etc. (IIRC)
It's just a case of figuring out what's what
 

Dentvar

New Member
Jul 29, 2019
678
0
0
Something I´m doing wrong -_-
I just renamed the playerdata directory to playerdata_old and copied the one in from the world download that is 3 days old. But My inventory is still the empty one from before. I cheated myself a Dirt block so I can test this. And the Dirt block is still there.
I¨m talking about the playerdata in: "Minecraft\InfiTech2\minecraft\saves\world"
 

Master_Builder_800

New Member
Jul 29, 2019
266
-1
0
Are you sure you didn't accidentally do a /clear? and considering you opened it to LAN you might have had a friend or something troll you.
 

Dentvar

New Member
Jul 29, 2019
678
0
0
I have no friends so no one can Troll me -_- :)
And I´m pritty sure that I did not clear it because the time I started in the game without my stuff I spawned at the world Spawn as I would be a new player

@MigukNamja Any Idea what could wen´t wrong? I mean its your world maybe you know best :)
 

Ruzen

New Member
Apr 10, 2020
1
0
1
Hello, i know its been like 5 years but for those who are still having this problem i found a solution.
1.First of all download after you downloaded your map from the server, put it in minecraft( its better to have a backup) in the saves folder
2.Before entering minecraft look at the playerdata and try to identify your uuid ( I found my id in saves/yourworld/data/ftblib/players. You will find here some id like this "45937aac9d903b4f99f22f0137bbb773". Go to edit with notepad and look at the end of the note. You will see there the name of the player in game. BTW if you dont have ftblib try finding something similar in the data folder)
3.Now you identified your last id enter in game and in the world. The map will create a new id in playerdata folder , doesnt matter if you have the same nickname.
4.Copy that id and delete the map from minecraft.
5.Put the backup of the map in minecraft (the map from the server that you didnt played on singleplayer yet)
6.Go to saves/yourworld/playerdata and find your last id (step 2). Rename it with the id you copied at the step 4.
7.You are good to go now.

If you have a questing mod like i did you would have to replace the last id with the new one in every place you find it.And i think is the same for other similar mods. Hope you understood what i wrote down here and it works for you. Peace