Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf: exclusion doesn't always work if a modpack has same slug as excluded mod #3252

Closed
itzg opened this issue Jan 14, 2025 · 1 comment · Fixed by #3254
Closed

cf: exclusion doesn't always work if a modpack has same slug as excluded mod #3252

itzg opened this issue Jan 14, 2025 · 1 comment · Fixed by #3254
Labels

Comments

@itzg
Copy link
Owner

itzg commented Jan 14, 2025

Discussed in Discord

Lighty is an example of this. Given

      TYPE: "AUTO_CURSEFORGE"
      CF_PAGE_URL: "https://www.curseforge.com/minecraft/modpacks/enigmatica10"
      CF_EXCLUDE_MODS: |
        yungs-menu-tweaks
        noisium
        lighty

The resolved exclusion IDs doesn't include the expected mod ID of 986380

2025-01-14T14:32:19.026861424Z [mc-image-helper] 14:32:19.026 DEBUG : Using ExcludeIncludeIds(excludeIds=[303876, 825358, 520973, 253449, 521480, 308240, 243478, 835861, 441114, 557076, 511770, 250398, 676136, 502561, 238372, 637729, 917285, 238891, 543776, 85032, 866084, 358191, 285742, 238120, 654373, 236078, 920353, 551736, 250419, 285492, 36913, 558905, 463155, 422719, 666672, 225603, 258881, 927564, 222789, 297038, 823106, 254284, 511319, 455508, 291926, 1034842, 1103431, 261725, 337243, 663125, 367706, 429926, 435044, 457570, 226406, 363363, 433760, 270441, 628345, 682363, 521590, 227441, 499826, 271740, 293496, 581495, 574856, 278406, 237701, 272515, 456335, 292232, 657286, 909469, 930207, 819615, 316304, 286352, 310673, 314002, 532127, 622737, 430746, 291480, 255389, 574123, 858542, 264353, 267939, 910506, 520110, 245933, 410295, 228529, 659897, 376753, 292785, 79287, 898746, 60089, 441277, 853424, 913587, 447673, 285381, 613067, 904910, 815304, 238534, 606159, 236484, 908741, 535489, 224712, 270539, 248787, 561885, 37333, 244181, 278494, 313816, 787666, 700629, 394468, 421605, 261605, 245733, 284904, 557796, 513769, 511733, 240630, 401648, 568563], forceIncludeIds=[])

Instead it's picking up the modpack with the slug lighty:
https://www.curseforge.com/minecraft/modpacks/lighty

This call path in mc-image-helper needs to narrow allowed category IDs to just mods

CurseForgeApiClient.slugToId(CategoryInfo, String)  (me.itzg.helpers.curseforge)
CurseForgeInstaller.resolveFromSlugOrIds(InstallContext, CategoryInfo, Collection<String>, Collection<String>)  (me.itzg.helpers.curseforge)
CurseForgeInstaller.resolveExcludeIncludes(InstallContext)(2 usages)  (me.itzg.helpers.curseforge)
CurseForgeInstaller.processModpack(InstallContext, MinecraftModpackManifest, OverridesApplier)  (me.itzg.helpers.curseforge)
@itzg itzg added the bug label Jan 14, 2025
@itzg itzg moved this to In progress in Docker Minecraft Jan 14, 2025
@itzg
Copy link
Owner Author

itzg commented Jan 14, 2025

Can locate mc-mod category/class ID from categoryInfo

image

Instead of slugToId, should call existing me.itzg.helpers.curseforge.CurseForgeApiClient#searchMod and map out the ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant