From 69d94c54c333ce6df545827ddfdd3ecb7f1ac8b8 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Tue, 30 May 2023 15:43:48 +0300 Subject: [PATCH] CurseForge accepts `loaders` only for mods Fixes #69 --- .../curseforge/curseforge-upload-api-client.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/platforms/curseforge/curseforge-upload-api-client.ts b/src/platforms/curseforge/curseforge-upload-api-client.ts index 75a04a4..677e00c 100644 --- a/src/platforms/curseforge/curseforge-upload-api-client.ts +++ b/src/platforms/curseforge/curseforge-upload-api-client.ts @@ -207,10 +207,9 @@ export class CurseForgeUploadApiClient { const addonGameVersionIds = findCurseForgeGameVersionIdsByNames(map.game_versions_for_addons, pluginGameVersionNames, undefined, CURSEFORGE_GAME_VERSION_PLUGIN_NAME_COMPARER); const idVariants = [ - // These ids are the most common on CurseForge. + // These ids are used by: `Mods`. // - // They are used by: `Mods`, `Modpacks`, `Customization`, - // `Resource Packs`, and `Worlds`. + // This is the most common project type out there, so we try these ids first. loaderIds.length ? gameVersionIds.concat(loaderIds, javaIds) : gameVersionIds, // These ids are used by: `Bukkit Plugins`. @@ -220,6 +219,13 @@ export class CurseForgeUploadApiClient { // to publish plugins with it, rather than addons. pluginGameVersionIds, + // These ids are used by: `Modpacks`, `Customization`, + // `Resource Packs`, and `Worlds`. + // + // The same ids as for `Mods`, but without loaders, because + // those are not supported for any other project type. + loaderIds.length ? gameVersionIds : [], + // These ids are used by: `Addons`. addonGameVersionIds, ];