refactor: unglob std::wstring

This commit is contained in:
Tropical
2026-03-08 22:43:43 +01:00
committed by JuiceyDev
parent c571014bc9
commit cff2fc5f44
581 changed files with 2156 additions and 2154 deletions
+10 -10
View File
@@ -28,32 +28,32 @@ public:
};
private:
static std::unordered_map<wstring, entityCreateFn> *idCreateMap;
static std::unordered_map<eINSTANCEOF, wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classIdMap;
static std::unordered_map<std::wstring, entityCreateFn> *idCreateMap;
static std::unordered_map<eINSTANCEOF, std::wstring, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classIdMap;
static std::unordered_map<int, entityCreateFn> *numCreateMap;
static std::unordered_map<int, eINSTANCEOF> *numClassMap;
static std::unordered_map<eINSTANCEOF, int, eINSTANCEOFKeyHash, eINSTANCEOFKeyEq> *classNumMap;
static std::unordered_map<wstring, int> *idNumMap;
static std::unordered_map<std::wstring, int> *idNumMap;
public:
static std::unordered_map<int, SpawnableMobInfo *> idsSpawnableInCreative;
private:
static void setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum);
static void setId(entityCreateFn createFn, eINSTANCEOF clas, const wstring &id, int idNum, eMinecraftColour color1, eMinecraftColour color2, int nameId);
static void setId(entityCreateFn createFn, eINSTANCEOF clas, const std::wstring &id, int idNum);
static void setId(entityCreateFn createFn, eINSTANCEOF clas, const std::wstring &id, int idNum, eMinecraftColour color1, eMinecraftColour color2, int nameId);
public:
static void staticCtor();
static std::shared_ptr<Entity> newEntity(const wstring& id, Level *level);
static std::shared_ptr<Entity> newEntity(const std::wstring& id, Level *level);
static std::shared_ptr<Entity> loadStatic(CompoundTag *tag, Level *level);
static std::shared_ptr<Entity> newById(int id, Level *level);
static std::shared_ptr<Entity> newByEnumType(eINSTANCEOF eType, Level *level);
static int getId(std::shared_ptr<Entity> entity);
static wstring getEncodeId(std::shared_ptr<Entity> entity);
static int getId(const wstring &encodeId);
static wstring getEncodeId(int entityIoValue);
static std::wstring getEncodeId(std::shared_ptr<Entity> entity);
static int getId(const std::wstring &encodeId);
static std::wstring getEncodeId(int entityIoValue);
static int getNameId(int entityIoValue);
static eINSTANCEOF getType(const wstring &idString);
static eINSTANCEOF getType(const std::wstring &idString);
static eINSTANCEOF getClass(int id);
// 4J-JEV, added for enumerating mobs.