Compare commits
No commits in common. "afad1fdcd99e244d0ad41e6cbe28cece5fb3251c" and "bc357afd78eb517441bda05f851eb0a958ec5d79" have entirely different histories.
afad1fdcd9
...
bc357afd78
12
flake.lock
12
flake.lock
@ -34,11 +34,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722141560,
|
"lastModified": 1712129508,
|
||||||
"narHash": "sha256-Ul3rIdesWaiW56PS/Ak3UlJdkwBrD4UcagCmXZR9Z7Y=",
|
"narHash": "sha256-FBVpEX0eLiqX3jnSL3rmJHqHhbuCikJZyDyV3Cl3qAY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "038fb464fcfa79b4f08131b07f2d8c9a6bcc4160",
|
"rev": "d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -59,11 +59,11 @@
|
|||||||
"tomlplusplus": {
|
"tomlplusplus": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720775063,
|
"lastModified": 1710824845,
|
||||||
"narHash": "sha256-9j8qNCITFPvKECY5Sjb2Ri5KcPzRrF0e7G2CUemIhBw=",
|
"narHash": "sha256-A9XuCfVcLle/tMNaH7aqb1leM+t3wwC9ER5RIbMMovo=",
|
||||||
"owner": "marzer",
|
"owner": "marzer",
|
||||||
"repo": "tomlplusplus",
|
"repo": "tomlplusplus",
|
||||||
"rev": "e2bae9d559b4956a831fcef10ac8f01c88cb0d13",
|
"rev": "1f7884e59165e517462f922e7b6de131bd9844f3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -60,7 +60,6 @@
|
|||||||
|
|
||||||
static const QMap<QString, ModAPI::ModLoaderType> modloaderMapping{
|
static const QMap<QString, ModAPI::ModLoaderType> modloaderMapping{
|
||||||
{"net.minecraftforge", ModAPI::Forge},
|
{"net.minecraftforge", ModAPI::Forge},
|
||||||
{"net.neoforged.neoforge", ModAPI::NeoForge},
|
|
||||||
{"net.fabricmc.fabric-loader", ModAPI::Fabric},
|
{"net.fabricmc.fabric-loader", ModAPI::Fabric},
|
||||||
{"org.quiltmc.quilt-loader", ModAPI::Quilt}
|
{"org.quiltmc.quilt-loader", ModAPI::Quilt}
|
||||||
};
|
};
|
||||||
|
@ -297,7 +297,7 @@ void LocalModParseTask::processAsZip()
|
|||||||
|
|
||||||
QuaZipFile file(&zip);
|
QuaZipFile file(&zip);
|
||||||
|
|
||||||
if (zip.setCurrentFile("META-INF/neoforge.mods.toml") || zip.setCurrentFile("META-INF/mods.toml")) {
|
if (zip.setCurrentFile("META-INF/mods.toml")) {
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
zip.close();
|
zip.close();
|
||||||
return;
|
return;
|
||||||
|
@ -60,8 +60,7 @@ class ModAPI {
|
|||||||
Cauldron = 1 << 1,
|
Cauldron = 1 << 1,
|
||||||
LiteLoader = 1 << 2,
|
LiteLoader = 1 << 2,
|
||||||
Fabric = 1 << 3,
|
Fabric = 1 << 3,
|
||||||
Quilt = 1 << 4,
|
Quilt = 1 << 4
|
||||||
NeoForge = 1 << 5
|
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(ModLoaderTypes, ModLoaderType)
|
Q_DECLARE_FLAGS(ModLoaderTypes, ModLoaderType)
|
||||||
|
|
||||||
@ -94,8 +93,6 @@ class ModAPI {
|
|||||||
break;
|
break;
|
||||||
case Forge:
|
case Forge:
|
||||||
return "forge";
|
return "forge";
|
||||||
case NeoForge:
|
|
||||||
return "neoforge";
|
|
||||||
case Cauldron:
|
case Cauldron:
|
||||||
return "cauldron";
|
return "cauldron";
|
||||||
case LiteLoader:
|
case LiteLoader:
|
||||||
|
@ -79,8 +79,6 @@ class FlameAPI : public NetworkModAPI {
|
|||||||
// 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; // Quilt would probably be 5
|
||||||
if (loaders & NeoForge)
|
|
||||||
return 6;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -257,7 +257,6 @@ bool FlameCreationTask::createInstance()
|
|||||||
|
|
||||||
QString forgeVersion;
|
QString forgeVersion;
|
||||||
QString fabricVersion;
|
QString fabricVersion;
|
||||||
QString neoforgeVersion;
|
|
||||||
// TODO: is Quilt relevant here?
|
// TODO: is Quilt relevant here?
|
||||||
for (auto& loader : m_pack.minecraft.modLoaders) {
|
for (auto& loader : m_pack.minecraft.modLoaders) {
|
||||||
auto id = loader.id;
|
auto id = loader.id;
|
||||||
@ -271,11 +270,6 @@ bool FlameCreationTask::createInstance()
|
|||||||
fabricVersion = id;
|
fabricVersion = id;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (id.startsWith("neoforge-")) {
|
|
||||||
id.remove("neoforge-");
|
|
||||||
neoforgeVersion = id;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
logWarning(tr("Unknown mod loader in manifest: %1").arg(id));
|
logWarning(tr("Unknown mod loader in manifest: %1").arg(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,8 +300,6 @@ bool FlameCreationTask::createInstance()
|
|||||||
}
|
}
|
||||||
if (!fabricVersion.isEmpty())
|
if (!fabricVersion.isEmpty())
|
||||||
components->setComponentVersion("net.fabricmc.fabric-loader", fabricVersion);
|
components->setComponentVersion("net.fabricmc.fabric-loader", fabricVersion);
|
||||||
if (!neoforgeVersion.isEmpty())
|
|
||||||
components->setComponentVersion("net.neoforged.neoforge", neoforgeVersion);
|
|
||||||
|
|
||||||
if (m_instIcon != "default") {
|
if (m_instIcon != "default") {
|
||||||
instance.setIconKey(m_instIcon);
|
instance.setIconKey(m_instIcon);
|
||||||
|
@ -313,8 +313,6 @@ void PackInstallTask::install()
|
|||||||
components->setComponentVersion("net.minecraftforge", target.version);
|
components->setComponentVersion("net.minecraftforge", target.version);
|
||||||
} else if (target.name == "fabric") {
|
} else if (target.name == "fabric") {
|
||||||
components->setComponentVersion("net.fabricmc.fabric-loader", target.version);
|
components->setComponentVersion("net.fabricmc.fabric-loader", target.version);
|
||||||
} else if (target.name == "neoforge") {
|
|
||||||
components->setComponentVersion("net.neoforged.neoforge", target.version);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class ModrinthAPI : public NetworkModAPI {
|
|||||||
static auto getModLoaderStrings(const ModLoaderTypes types) -> const QStringList
|
static auto getModLoaderStrings(const ModLoaderTypes types) -> const QStringList
|
||||||
{
|
{
|
||||||
QStringList l;
|
QStringList l;
|
||||||
for (auto loader : {Forge, NeoForge, Fabric, Quilt})
|
for (auto loader : {Forge, Fabric, Quilt})
|
||||||
{
|
{
|
||||||
if ((types & loader) || types == Unspecified)
|
if ((types & loader) || types == Unspecified)
|
||||||
{
|
{
|
||||||
@ -81,7 +81,7 @@ class ModrinthAPI : public NetworkModAPI {
|
|||||||
inline auto getModSearchURL(SearchArgs& args) const -> QString override
|
inline auto getModSearchURL(SearchArgs& args) const -> QString override
|
||||||
{
|
{
|
||||||
if (!validateModLoaders(args.loaders)) {
|
if (!validateModLoaders(args.loaders)) {
|
||||||
qWarning() << "Modrinth only have Forge, NeoForge and Fabric-compatible mods!";
|
qWarning() << "Modrinth only have Forge and Fabric-compatible mods!";
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class ModrinthAPI : public NetworkModAPI {
|
|||||||
|
|
||||||
inline auto validateModLoaders(ModLoaderTypes loaders) const -> bool
|
inline auto validateModLoaders(ModLoaderTypes loaders) const -> bool
|
||||||
{
|
{
|
||||||
return (loaders == Unspecified) || (loaders & (Forge | NeoForge | Fabric | Quilt));
|
return (loaders == Unspecified) || (loaders & (Forge | Fabric | Quilt));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -108,7 +108,7 @@ void ModrinthCheckUpdate::executeTask()
|
|||||||
// Sometimes a version may have multiple files, one with "forge" and one with "fabric",
|
// Sometimes a version may have multiple files, one with "forge" and one with "fabric",
|
||||||
// so we may want to filter it
|
// so we may want to filter it
|
||||||
QString loader_filter;
|
QString loader_filter;
|
||||||
static auto flags = { ModAPI::ModLoaderType::Forge, ModAPI::ModLoaderType::NeoForge, ModAPI::ModLoaderType::Fabric, ModAPI::ModLoaderType::Quilt };
|
static auto flags = { ModAPI::ModLoaderType::Forge, ModAPI::ModLoaderType::Fabric, ModAPI::ModLoaderType::Quilt };
|
||||||
for (auto flag : flags) {
|
for (auto flag : flags) {
|
||||||
if (m_loaders.testFlag(flag)) {
|
if (m_loaders.testFlag(flag)) {
|
||||||
loader_filter = api.getModLoaderString(flag);
|
loader_filter = api.getModLoaderString(flag);
|
||||||
|
@ -215,8 +215,6 @@ bool ModrinthCreationTask::createInstance()
|
|||||||
components->setComponentVersion("org.quiltmc.quilt-loader", quiltVersion);
|
components->setComponentVersion("org.quiltmc.quilt-loader", quiltVersion);
|
||||||
if (!forgeVersion.isEmpty())
|
if (!forgeVersion.isEmpty())
|
||||||
components->setComponentVersion("net.minecraftforge", forgeVersion);
|
components->setComponentVersion("net.minecraftforge", forgeVersion);
|
||||||
if (!neoforgeVersion.isEmpty())
|
|
||||||
components->setComponentVersion("net.neoforged.neoforge", neoforgeVersion);
|
|
||||||
|
|
||||||
if (m_instIcon != "default") {
|
if (m_instIcon != "default") {
|
||||||
instance.setIconKey(m_instIcon);
|
instance.setIconKey(m_instIcon);
|
||||||
@ -387,8 +385,6 @@ bool ModrinthCreationTask::parseManifest(const QString& index_path, std::vector<
|
|||||||
quiltVersion = Json::requireString(*it, "Quilt Loader version");
|
quiltVersion = Json::requireString(*it, "Quilt Loader version");
|
||||||
} else if (name == "forge") {
|
} else if (name == "forge") {
|
||||||
forgeVersion = Json::requireString(*it, "Forge version");
|
forgeVersion = Json::requireString(*it, "Forge version");
|
||||||
} else if (name == "neoforge") {
|
|
||||||
neoforgeVersion = Json::requireString(*it, "NeoForge version");
|
|
||||||
} else {
|
} else {
|
||||||
throw JSONValidationError("Unknown dependency type: " + name);
|
throw JSONValidationError("Unknown dependency type: " + name);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class ModrinthCreationTask final : public InstanceCreationTask {
|
|||||||
private:
|
private:
|
||||||
QWidget* m_parent = nullptr;
|
QWidget* m_parent = nullptr;
|
||||||
|
|
||||||
QString minecraftVersion, fabricVersion, quiltVersion, forgeVersion, neoforgeVersion;
|
QString minecraftVersion, fabricVersion, quiltVersion, forgeVersion;
|
||||||
QString m_managed_id, m_managed_version_id, m_managed_name;
|
QString m_managed_id, m_managed_version_id, m_managed_name;
|
||||||
QString m_source_url;
|
QString m_source_url;
|
||||||
|
|
||||||
|
@ -240,9 +240,6 @@ void VersionPage::updateVersionControls()
|
|||||||
|
|
||||||
ui->actionInstall_Forge->setEnabled(controlsEnabled);
|
ui->actionInstall_Forge->setEnabled(controlsEnabled);
|
||||||
|
|
||||||
bool supportsNeoForge = minecraftVersion >= Version("1.20.1");
|
|
||||||
ui->actionInstall_NeoForge->setEnabled(controlsEnabled && supportsNeoForge);
|
|
||||||
|
|
||||||
bool supportsFabric = minecraftVersion >= Version("1.14");
|
bool supportsFabric = minecraftVersion >= Version("1.14");
|
||||||
ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric);
|
ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric);
|
||||||
|
|
||||||
@ -467,35 +464,6 @@ void VersionPage::on_actionInstall_Forge_triggered()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VersionPage::on_actionInstall_NeoForge_triggered()
|
|
||||||
{
|
|
||||||
auto vlist = APPLICATION->metadataIndex()->get("net.neoforged.neoforge");
|
|
||||||
if(!vlist)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
VersionSelectDialog vselect(vlist.get(), tr("Select NeoForge version"), this);
|
|
||||||
vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_profile->getComponentVersion("net.minecraft"));
|
|
||||||
vselect.setEmptyString(tr("No NeoForge versions are currently available for Minecraft ") + m_profile->getComponentVersion("net.minecraft"));
|
|
||||||
vselect.setEmptyErrorString(tr("Couldn't load or download the NeoForge version lists!"));
|
|
||||||
|
|
||||||
auto currentVersion = m_profile->getComponentVersion("net.neoforged.neoforge");
|
|
||||||
if(!currentVersion.isEmpty())
|
|
||||||
{
|
|
||||||
vselect.setCurrentVersion(currentVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vselect.exec() && vselect.selectedVersion())
|
|
||||||
{
|
|
||||||
auto vsn = vselect.selectedVersion();
|
|
||||||
m_profile->setComponentVersion("net.neoforged.neoforge", vsn->descriptor());
|
|
||||||
m_profile->resolve(Net::Mode::Online);
|
|
||||||
// m_profile->installVersion();
|
|
||||||
preselect(m_profile->rowCount(QModelIndex())-1);
|
|
||||||
m_container->refreshContainer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void VersionPage::on_actionInstall_Fabric_triggered()
|
void VersionPage::on_actionInstall_Fabric_triggered()
|
||||||
{
|
{
|
||||||
auto vlist = APPLICATION->metadataIndex()->get("net.fabricmc.fabric-loader");
|
auto vlist = APPLICATION->metadataIndex()->get("net.fabricmc.fabric-loader");
|
||||||
|
@ -72,7 +72,6 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void on_actionChange_version_triggered();
|
void on_actionChange_version_triggered();
|
||||||
void on_actionInstall_Forge_triggered();
|
void on_actionInstall_Forge_triggered();
|
||||||
void on_actionInstall_NeoForge_triggered();
|
|
||||||
void on_actionInstall_Fabric_triggered();
|
void on_actionInstall_Fabric_triggered();
|
||||||
void on_actionInstall_Quilt_triggered();
|
void on_actionInstall_Quilt_triggered();
|
||||||
void on_actionAdd_Empty_triggered();
|
void on_actionAdd_Empty_triggered();
|
||||||
|
@ -106,7 +106,6 @@
|
|||||||
<addaction name="actionRevert"/>
|
<addaction name="actionRevert"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionInstall_Forge"/>
|
<addaction name="actionInstall_Forge"/>
|
||||||
<addaction name="actionInstall_NeoForge"/>
|
|
||||||
<addaction name="actionInstall_Fabric"/>
|
<addaction name="actionInstall_Fabric"/>
|
||||||
<addaction name="actionInstall_Quilt"/>
|
<addaction name="actionInstall_Quilt"/>
|
||||||
<addaction name="actionInstall_LiteLoader"/>
|
<addaction name="actionInstall_LiteLoader"/>
|
||||||
@ -186,14 +185,6 @@
|
|||||||
<string>Install the Minecraft Forge package.</string>
|
<string>Install the Minecraft Forge package.</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionInstall_NeoForge">
|
|
||||||
<property name="text">
|
|
||||||
<string>Install NeoForge</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Install the NeoForge package.</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionInstall_Fabric">
|
<action name="actionInstall_Fabric">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Install Fabric</string>
|
<string>Install Fabric</string>
|
||||||
|
@ -64,7 +64,6 @@ VanillaPage::VanillaPage(NewInstanceDialog *dialog, QWidget *parent)
|
|||||||
connect(ui->loaderVersionList, &VersionSelectWidget::selectedVersionChanged, this, &VanillaPage::setSelectedLoaderVersion);
|
connect(ui->loaderVersionList, &VersionSelectWidget::selectedVersionChanged, this, &VanillaPage::setSelectedLoaderVersion);
|
||||||
connect(ui->noneFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->noneFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->forgeFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->forgeFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->neoForgeFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
|
||||||
connect(ui->fabricFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->fabricFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->quiltFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->quiltFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
connect(ui->liteLoaderFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
connect(ui->liteLoaderFilter, &QRadioButton::toggled, this, &VanillaPage::loaderFilterChanged);
|
||||||
@ -143,11 +142,6 @@ void VanillaPage::loaderFilterChanged()
|
|||||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion);
|
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion);
|
||||||
m_selectedLoader = "net.minecraftforge";
|
m_selectedLoader = "net.minecraftforge";
|
||||||
}
|
}
|
||||||
else if(ui->neoForgeFilter->isChecked())
|
|
||||||
{
|
|
||||||
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion);
|
|
||||||
m_selectedLoader = "net.neoforged.neoforge";
|
|
||||||
}
|
|
||||||
else if(ui->fabricFilter->isChecked())
|
else if(ui->fabricFilter->isChecked())
|
||||||
{
|
{
|
||||||
// FIXME: dirty hack because the launcher is unaware of Fabric's dependencies
|
// FIXME: dirty hack because the launcher is unaware of Fabric's dependencies
|
||||||
|
@ -204,16 +204,6 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="neoForgeFilter">
|
|
||||||
<property name="text">
|
|
||||||
<string>NeoForge</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">loaderBtnGroup</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="fabricFilter">
|
<widget class="QRadioButton" name="fabricFilter">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
Reference in New Issue
Block a user