diff --git a/Minecraft.Client/TexturePackRepository.cpp b/Minecraft.Client/TexturePackRepository.cpp index 2e2eea14..a8e80ac8 100644 --- a/Minecraft.Client/TexturePackRepository.cpp +++ b/Minecraft.Client/TexturePackRepository.cpp @@ -249,7 +249,19 @@ void TexturePackRepository::updateList() } } else if (file->isDirectory()) { - app.DebugPrintf("Found texture pack folder! %s", name); + app.DebugPrintf("Found folder texture pack! %s", name.c_str()); + DWORD id = 0; + for (int i = 0; i < INT_MAX; i++) + if (cacheById.find(i) == cacheById.end()) { + id = i; + break; + } + + FolderTexturePack* tp = new FolderTexturePack(id, file->getName(), file, DEFAULT_TEXTURE_PACK); + if (tp->hasData()) { + texturePacks->push_back(tp); + cacheById[id] = tp; + } } } catch (exception e) {