feat: add NeoForge to ModLoaderType
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
8f5bb982cd
commit
3a0aa353cc
@ -62,7 +62,8 @@
|
|||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "modplatform/ResourceAPI.h"
|
#include "modplatform/ResourceAPI.h"
|
||||||
|
|
||||||
static const QMap<QString, ResourceAPI::ModLoaderType> modloaderMapping{ { "net.minecraftforge", ResourceAPI::Forge },
|
static const QMap<QString, ResourceAPI::ModLoaderType> modloaderMapping{ { "net.neoforged", ResourceAPI::NeoForge },
|
||||||
|
{ "net.minecraftforge", ResourceAPI::Forge },
|
||||||
{ "net.fabricmc.fabric-loader", ResourceAPI::Fabric },
|
{ "net.fabricmc.fabric-loader", ResourceAPI::Fabric },
|
||||||
{ "org.quiltmc.quilt-loader", ResourceAPI::Quilt },
|
{ "org.quiltmc.quilt-loader", ResourceAPI::Quilt },
|
||||||
{ "com.mumfrey.liteloader", ResourceAPI::LiteLoader } };
|
{ "com.mumfrey.liteloader", ResourceAPI::LiteLoader } };
|
||||||
|
@ -54,7 +54,7 @@ class ResourceAPI {
|
|||||||
public:
|
public:
|
||||||
virtual ~ResourceAPI() = default;
|
virtual ~ResourceAPI() = default;
|
||||||
|
|
||||||
enum ModLoaderType { Forge = 1 << 0, Cauldron = 1 << 1, LiteLoader = 1 << 2, Fabric = 1 << 3, Quilt = 1 << 4 };
|
enum ModLoaderType { NeoForge = 1 << 0, Forge = 1 << 1, Cauldron = 1 << 2, LiteLoader = 1 << 3, Fabric = 1 << 4, Quilt = 1 << 5 };
|
||||||
Q_DECLARE_FLAGS(ModLoaderTypes, ModLoaderType)
|
Q_DECLARE_FLAGS(ModLoaderTypes, ModLoaderType)
|
||||||
|
|
||||||
struct SortingMethod {
|
struct SortingMethod {
|
||||||
@ -164,6 +164,8 @@ class ResourceAPI {
|
|||||||
static auto getModLoaderString(ModLoaderType type) -> const QString
|
static auto getModLoaderString(ModLoaderType type) -> const QString
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case NeoForge:
|
||||||
|
return "neoforge";
|
||||||
case Forge:
|
case Forge:
|
||||||
return "forge";
|
return "forge";
|
||||||
case Cauldron:
|
case Cauldron:
|
||||||
|
@ -46,7 +46,9 @@ class FlameAPI : public NetworkResourceAPI {
|
|||||||
return 4;
|
return 4;
|
||||||
// TODO: remove this once Quilt drops official Fabric support
|
// TODO: remove this once Quilt drops official Fabric support
|
||||||
if (loaders & Quilt) // NOTE: Most if not all Fabric mods should work *currently*
|
if (loaders & Quilt) // NOTE: Most if not all Fabric mods should work *currently*
|
||||||
return 4; // Quilt would probably be 5
|
return 4; // FIXME: implement multiple loaders filter
|
||||||
|
if (loaders & NeoForge)
|
||||||
|
return 6;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user