From caaca129adef053218ecf13e018f8fbe11a70340 Mon Sep 17 00:00:00 2001 From: Soggy_Pancake <54160598+Soggy-Pancake@users.noreply.github.com> Date: Sat, 21 Mar 2026 22:22:09 -0700 Subject: [PATCH] Load folder texture packs --- Minecraft.Client/TexturePackRepository.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) {