From ba820691d42128dce41e4d940ce8a76d7c21e17b Mon Sep 17 00:00:00 2001 From: piebot Date: Mon, 6 Apr 2026 11:42:50 +0200 Subject: [PATCH 1/3] Update Acknowledgments Section --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index bd6f394e..9d35a5e0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ Huge thanks to the following projects: - [Legacy Minigame Restoration Project](https://discord.gg/bg2kmbzFzv) - for their immense help with our project's deep decompilation work - [Patoke/LCERenewed](https://github.com/Patoke/LCERenewed) - for some of the patches that required deep decompilation -- [smartcmd/MinecraftConsoles](https://github.com/smartcmd/MinecraftConsoles) - for creating such a great repo # Build & Run From 8445534dc1efe323ec9381e2599c07432748d4e4 Mon Sep 17 00:00:00 2001 From: "George V." Date: Mon, 6 Apr 2026 16:35:42 +0300 Subject: [PATCH 2/3] fix(fishing): fix catch type return and correct aux value calculations - Add missing return of CatchType in getRandCatchType - Remove unused variable in getRandCatch - Fix duplicate semicolon in TREASURE case - Fix missing parentheses in fishing rod and bow calculations in handleCatch --- Minecraft.World/FishingHelper.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Minecraft.World/FishingHelper.cpp b/Minecraft.World/FishingHelper.cpp index b9903c9b..dfa34b77 100644 --- a/Minecraft.World/FishingHelper.cpp +++ b/Minecraft.World/FishingHelper.cpp @@ -50,16 +50,16 @@ CatchType FishingHelper::getRandCatchType(int luck, Random* random) CatchTypeWeighedItem* catchTypeWeighedItem = nullptr; catchTypeArray.calcWeights(luck); // Recalculate the weights based on the luck level of the player catchTypeWeighedItem = static_cast(WeighedRandom::getRandomItem(random, catchTypeArray)); + return catchTypeWeighedItem->getType(); } CatchWeighedItem* FishingHelper::getRandCatch(CatchType catchType, Random* random) { - CatchWeighedItem* catchWeighedItem = nullptr; switch (catchType) { case CatchType::FISH: return static_cast(WeighedRandom::getRandomItem(random, fishingFishArray)); case CatchType::TREASURE: - return static_cast(WeighedRandom::getRandomItem(random, fishingTreasuresArray));; + return static_cast(WeighedRandom::getRandomItem(random, fishingTreasuresArray)); case CatchType::JUNK: return static_cast(WeighedRandom::getRandomItem(random, fishingJunkArray)); } @@ -75,11 +75,11 @@ std::shared_ptr FishingHelper::handleCatch(CatchWeighedItem* weigh itemInstance->setAuxValue((int) (itemInstance->getMaxDamage() * ((double) random->nextInt(901) + 100.0) / 1000.0)); // 10% to 100% damage } else if (itemInstance->id == Item::fishingRod_Id && catchType == CatchType::TREASURE) { - itemInstance->setAuxValue((int)(itemInstance->getMaxDamage() * ((double)random->nextInt(251) / 1000.0)); // 0% to 25% damage + itemInstance->setAuxValue((int)(itemInstance->getMaxDamage() * ((double)random->nextInt(251) / 1000.0))); // 0% to 25% damage itemInstance = EnchantmentHelper::enchantItem(random, itemInstance, 30); } else if (itemInstance->id == Item::bow_Id) { - itemInstance->setAuxValue((int)(itemInstance->getMaxDamage() * ((double)random->nextInt(251) / 1000.0)); // 0% to 25% damage + itemInstance->setAuxValue((int)(itemInstance->getMaxDamage() * ((double)random->nextInt(251) / 1000.0))); // 0% to 25% damage itemInstance = EnchantmentHelper::enchantItem(random, itemInstance, 30); } else if (itemInstance->id == Item::book_Id) { From 459bc20a7766a9645f5b54fa4ea50f2032bedcc3 Mon Sep 17 00:00:00 2001 From: Lord_Cambion Date: Tue, 7 Apr 2026 00:45:52 +0200 Subject: [PATCH 3/3] dlcfix --- Minecraft.Client/Common/DLC/DLCAudioFile.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/Common/DLC/DLCAudioFile.cpp b/Minecraft.Client/Common/DLC/DLCAudioFile.cpp index 85ea3095..480569b1 100644 --- a/Minecraft.Client/Common/DLC/DLCAudioFile.cpp +++ b/Minecraft.Client/Common/DLC/DLCAudioFile.cpp @@ -170,6 +170,14 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength) for(unsigned int i=0;i(pFile->dwType); + + //Bounds Checking + if (type < 0 || type >= e_AudioType_Max) + { + app.DebugPrintf("Error parser: EAudioType (%d) out of bounds!\n", type); + + continue; + } // Params unsigned int uiParameterCount=*(unsigned int *)pbTemp; pbTemp+=sizeof(int); @@ -182,7 +190,8 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength) if(it != parameterMapping.end() ) { - addParameter(type,static_cast(pParams->dwType),(WCHAR *)pParams->wchData); + //addParameter(type,static_cast(pParams->dwType),(WCHAR *)pParams->wchData); + addParameter(type, it->second, (WCHAR *)pParams->wchData); } pbTemp+=sizeof(C4JStorage::DLC_FILE_PARAM)+(sizeof(WCHAR)*pParams->dwWchCount); pParams = (C4JStorage::DLC_FILE_PARAM *)pbTemp;