feat: achievements, minecraft store, languages, auto lb sendStats, more Language Strings

This commit is contained in:
Byte
2026-06-23 20:40:27 +02:00
parent 658849b427
commit 028dcdce41
58 changed files with 1649 additions and 375 deletions
@@ -4,6 +4,7 @@
#include <algorithm>
#include <vector>
#include <thread>
#include "../Network/json.hpp"
using json = nlohmann::json;
@@ -168,6 +169,31 @@ bool WindowsLeaderboardManager::WriteStats(unsigned int viewCount, ViewIn views)
return false; // Since WriteStats is useless we just do this, exact same thing is done in DurangoLeaderboardManager
}
// ByteBukkit: Tick function
void WindowsLeaderboardManager::Tick()
{
if (++m_tickCount < 1000)
return;
m_tickCount = 0;
std::thread([this]()
{
static const EStatsType types[] = {
eStatsType_Travelling,
eStatsType_Mining,
eStatsType_Farming,
eStatsType_Kills,
};
for (EStatsType t : types)
{
for (int diff = 0; diff <= 3; ++diff)
SendStats(t, diff);
}
}).detach();
}
bool WindowsLeaderboardManager::SendStats(EStatsType type, int diff)
{
if (!Windows64Launcher::IsInOfflineMode || Windows64Minecraft::IsOfflineMode)