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

VERSION_FROM_MODRINTH_PROJECTS should consider platform

Open github-dotEXE opened this issue 3 months ago • 1 comments

Describe the problem

I currently have this setup

    image: itzg/minecraft-server
    environment:
      TYPE: PAPER
      VERSION: 1.21.9
      MODRINTH_ALLOWED_VERSION_TYPE: beta
      VERSION_FROM_MODRINTH_PROJECTS: true
      MODRINTH_PROJECTS: |
        simple-voice-chat
        armor-poser-plugin
        worldedit
      # ...
    # ...

here, VERSION_FROM_MODRINTH_PROJECTS resolves to 1.21.8, as expected

[init] Resolved Minecraft version 1.21.8 from Modrinth projects

i also have another container with this config (only difference is that there is no worldedit plugin):

    image: itzg/minecraft-server
    environment:
      TYPE: PAPER
      VERSION: 1.21.9
      MODRINTH_ALLOWED_VERSION_TYPE: beta
      VERSION_FROM_MODRINTH_PROJECTS: true
      MODRINTH_PROJECTS: |
        simple-voice-chat
        armor-poser-plugin
      # ...
    # ...

this configuration resolves to 1.21.9 and then it errors.

[init] Resolved Minecraft version 1.21.9 from Modrinth projects
[init] Resolving type given PAPER
[mc-image-helper] 11:15:44.425 ERROR : Invalid parameter provided for 'modrinth' command: No files are available for the project 'Simple Voice Chat' for loader paper and Minecraft version 1.21.9

The error is because Simple Voice Chat currently doesnt actually currently have a version for 1.21.9 Paper. It only has a version for 1.21.9 Fabric and NeoForge.

Here are the supported versions for the other plugins mentioned above:

  • worldedit: < 1.21.8
  • simple-voice-chat: < 1.21.8 for everything but an alpha release for NeoForge and a beta release for Fabric
  • armor-poser-plugin: 1.21.9

What i get from this is that VERSION_FROM_MODRINTH_PROJECTS only checks if there is any release for the version and not that the selected platform has a release for that version

Container definition

see above

Container logs

see above

github-dotEXE avatar Oct 01 '25 11:10 github-dotEXE

That's a good request. I'll have to enhance mc image helper since right now I have it just skim the top level project info

https://docs.modrinth.com/api/operations/getproject/

itzg avatar Oct 01 '25 12:10 itzg

I assume the loader type should be passed as parameter to version-from-modrinth-projects here? https://github.com/itzg/docker-minecraft-server/blob/master/scripts/start-configuration#L160

https://docs.modrinth.com/api/operations/getproject/#200 Image From what i can see the loader type is already parsed when fetching project info? https://github.com/itzg/mc-image-helper/blob/master/src/main/java/me/itzg/helpers/modrinth/ProjectRef.java#L91

https://github.com/itzg/mc-image-helper?tab=readme-ov-file#version-from-modrinth-projects https://github.com/itzg/mc-image-helper/blob/master/src/main/java/me/itzg/helpers/modrinth/VersionFromModrinthProjectsCommand.java So otherwise its just a matter of adding it as a condition here? I could give it a try

bestcodename avatar Dec 13 '25 23:12 bestcodename

From what i can see the loader type is already parsed when fetching project info?

@bestcodename That'll be for per-project loader override. Passing in the overall loader would be like

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

Thanks for looking into this. I'll be happy to review PRs when you're ready.

itzg avatar Dec 14 '25 01:12 itzg