Skip to content

Commit

Permalink
CurseForge accepts loaders only for mods
Browse files Browse the repository at this point in the history
Fixes #69
  • Loading branch information
Kir-Antipov committed May 30, 2023
1 parent 9cf54a3 commit 69d94c5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/platforms/curseforge/curseforge-upload-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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,
];
Expand Down

0 comments on commit 69d94c5

Please sign in to comment.