Files
MinecraftConsoles/Minecraft.World/SavedDataStorage.h
void_17 7074f35e4b shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
2026-03-02 15:58:20 +07:00

36 lines
825 B
C++

#pragma once
using namespace std;
class ConsoleSaveFile;
#include "SavedData.h"
class SavedDataStorage
{
private:
LevelStorage *levelStorage;
typedef unordered_map<wstring, std::shared_ptr<SavedData> > cacheMapType;
cacheMapType cache;
vector<std::shared_ptr<SavedData> > savedDatas;
typedef unordered_map<wstring, short> uaiMapType;
uaiMapType usedAuxIds;
public:
SavedDataStorage(LevelStorage *);
std::shared_ptr<SavedData> get(const type_info& clazz, const wstring& id);
void set(const wstring& id, std::shared_ptr<SavedData> data);
void save();
private:
void save(std::shared_ptr<SavedData> data);
void loadAuxValues();
public:
int getFreeAuxValueFor(const wstring& id);
// 4J Added
int getAuxValueForMap(PlayerUID xuid, int dimension, int centreXC, int centreZC, int scale);
};