update lcemp networking

This commit is contained in:
2026-08-14 07:02:50 +03:00
parent 125819419f
commit 6853eab85f
51 changed files with 629 additions and 183 deletions
+22
View File
@@ -432,6 +432,28 @@ void DirectoryLevelStorage::save(shared_ptr<Player> player)
CompoundTag *DirectoryLevelStorage::load(shared_ptr<Player> player)
{
CompoundTag *tag = loadPlayerDataTag( player->getXuid() );
#if defined(_WINDOWS64) || defined(DISABLE_PSN) || defined(_DISABLE_XBLIVE)
if (tag == NULL)
{
const PlayerUID WIN64_XUID_BASE = (PlayerUID)0xe000d45248242f2e;
for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++)
{
PlayerUID oldXuid = WIN64_XUID_BASE + i;
tag = loadPlayerDataTag(oldXuid);
if (tag != NULL)
{
ConsoleSavePath oldFile = ConsoleSavePath(playerDir.getName() + _toString(oldXuid) + L".dat");
if (m_saveFile->doesFileExist(oldFile))
{
m_saveFile->deleteFile(m_saveFile->createFile(oldFile));
}
app.DebugPrintf("Migrated player data from old XUID %llu to new XUID %llu\n", oldXuid, player->getXuid());
break;
}
}
}
#endif
if (tag != NULL)
{
player->load(tag);