docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

Support for Modrinth ModPacks

Open ModProg opened this issue 3 years ago • 9 comments

Enhancement Type

New server type

Describe the enhancement

Currently, Modrinth mod packs are still in alpha, but as far as I can tell the format seems to be stable. It is described here: https://docs.modrinth.com/docs/modpacks/format_definition/

ModProg avatar Jun 19 '22 15:06 ModProg

That file format looks awesome. I wish all the modpacks would align on this format.

I'll probably implement this within https://github.com/itzg/mc-image-helper, but will track integration with this issue.

itzg avatar Jun 19 '22 16:06 itzg

...and just noting the CDN URL seems to be:

https://cdn.modrinth.com/data/{projectId}/versions/{version}/{name}-{version}.jar

EDIT this note is no longer relevant, due to API usage to locate project assets.

itzg avatar Jun 19 '22 17:06 itzg

FYI the initial steps towards Modrinth modpack support is included in #1577

itzg avatar Jun 26 '22 23:06 itzg

Modrinth admin here -- just wanted to let it be known that the format of CDN URLs should not be relied upon, since the file name can be whatever the author wants. The exact CDN URL can be obtained via use of the Get version from hash route (example) or from the Get a version route (example) depending on what information you already have.

I'm not sure how relevant it is, but you might also get some use out of the Latest versions of multiple project from hashes, loader(s), and game version(s) route (wow that's a mouthful), looking at how the initial implementation was done.

If you've got any other questions or issues with Modrinth feel free to get in touch with me, here or Discord (Emmaffle#1787) or email ([email protected]) :)

triphora avatar Jul 09 '22 03:07 triphora

Thanks @wafflecoffee . Please disregard my note about CDN structure. I'm already using the API as you described for retrieval of individual mod project files

https://github.com/itzg/mc-image-helper/blob/master/src/main/java/me/itzg/helpers/modrinth/ModrinthCommand.java

When will modpack support leave alpha? To be honest I am hesitant to put more effort into this until I see traction with the modpacks published on Modrinth; however, I'm assuming traction will be slow until it leaves alpha.

itzg avatar Jul 09 '22 13:07 itzg

Alpha doesn't really mean that it's unstable; the pack format is set in stone until we bump it to 2. More or less, it's meant as an indicator that our plans for modpacks are not yet complete. Once https://github.com/modrinth/theseus is complete, that's when it'll leave alpha.

triphora avatar Jul 09 '22 16:07 triphora

Cool, I'll works towards modpack retrieval and extraction shortly.

itzg avatar Jul 09 '22 23:07 itzg

Is this still planned as a feature? Would be great to have a way to pull down a modrinth pack!

lizardfish0 avatar Dec 09 '22 23:12 lizardfish0

It sure is @lizardfish0

itzg avatar Dec 10 '22 00:12 itzg

Hey, will this be released anytime soon?

douglasparker avatar May 09 '23 23:05 douglasparker

I'm planning on working on this within the next week or two.

itzg avatar May 10 '23 00:05 itzg

Awesome, thank you so much!

douglasparker avatar May 10 '23 01:05 douglasparker

Next image build will include the modpack support documented here:

https://github.com/itzg/docker-minecraft-server#running-a-server-with-a-modrinth-modpack

Let me know if there's any issues/questions.

itzg avatar May 14 '23 18:05 itzg

Next image build will include the modpack support documented here:

https://github.com/itzg/docker-minecraft-server#running-a-server-with-a-modrinth-modpack

Let me know if there's any issues/questions.

Thank you so much! This is going to be so helpful!

douglasparker avatar May 14 '23 19:05 douglasparker

Let me know if there's any issues/questions.

@itzg What's the difference between the VERSION and MODRINTH_MC_VERSION environmental variables?

I currently use VERSION. Do I need to use MODRINTH_MC_VERSION instead now?

EDIT: Is there a way to override the fabric loader? I know that you can with TYPE as fabric, but it doesn't seem to work with TYPE: MODRINTH

douglasparker avatar May 15 '23 18:05 douglasparker

Let me know if there's any issues/questions.

@itzg What's the difference between the VERSION and MODRINTH_MC_VERSION environmental variables?

I currently use VERSION. Do I need to use MODRINTH_MC_VERSION instead now?

Yeah, this ended up more confusing than I'd like. I'll work on leveraging VERSION as the requested modpack minecraft version, but to be ready for that change so ahead and set both to the desired version.

EDIT: Is there a way to override the fabric loader? I know that you can with TYPE as fabric, but it doesn't seem to work with TYPE: MODRINTH

I'm curious why you would want to do that since the modpack is declaring a specific loader version to use?

itzg avatar May 15 '23 20:05 itzg

Let me know if there's any issues/questions.

@itzg What's the difference between the VERSION and MODRINTH_MC_VERSION environmental variables? I currently use VERSION. Do I need to use MODRINTH_MC_VERSION instead now?

Yeah, this ended up more confusing than I'd like. I'll work on leveraging VERSION as the requested modpack minecraft version, but to be ready for that change so ahead and set both to the desired version.

Okay, I will define both versions and keep an eye out on future releases for updates on this!

EDIT: Is there a way to override the fabric loader? I know that you can with TYPE as fabric, but it doesn't seem to work with TYPE: MODRINTH

I'm curious why you would want to do that since the modpack is declaring a specific loader version to use?

One of our servers is using a modpack + a wide variety of mods.

Most of these mods respect the Minecraft version specified, but some of the mods and/or dependencies claim to support 1.19.2 but call for a different version of the fabric loader than what is shipped with the latest version of 1.19.2

I feel like a lot of these mods don't respect semver properly, so we are resorting to locking mods to a specific version and testing updates ourselves. It's my opinion that we shouldn't have these issues when following the semver spec, but I suppose stuff like this can happen when you run with a lot of mods with various levels of quality control.

Our solution is to lock mods to specific versions or only run a few mods from trusted developers with good quality control, but having the ability to override the mod loader version could come in handy.

douglasparker avatar May 15 '23 21:05 douglasparker

This next build leverages VERSION as you'd expect and so MODRINTH_MC_VERSION goes away. Speaking of versions, file version now universally supported with MODRINTH_VERSION where ID, name, or number can be provided.

itzg avatar May 15 '23 23:05 itzg

Our solution is to lock mods to specific versions or only run a few mods from trusted developers with good quality control, but having the ability to override the mod loader version could come in handy.

@douglasparker can you write up an issue for that? I'll get that into the next round or two of changes.

itzg avatar May 15 '23 23:05 itzg

Our solution is to lock mods to specific versions or only run a few mods from trusted developers with good quality control, but having the ability to override the mod loader version could come in handy.

@douglasparker can you write up an issue for that? I'll get that into the next round or two of changes.

Sure no problem! I have created issue #2131

douglasparker avatar May 15 '23 23:05 douglasparker