Skip to content

Optional Modrinth projects (graceful skip on version mismatch) #3997

@Vianpyro

Description

@Vianpyro

Enhancement Type

Improve an existing feature

Describe the enhancement

Describe the enhancement

Problem

When using MODRINTH_PROJECTS with VERSION=LATEST (or VERSION_FROM_MODRINTH_PROJECTS=true), the server startup fails entirely if any listed mod doesn't have a compatible version for the target Minecraft release. This is frustrating for mods that are "nice to have" but not required for the server to function -- like map renderers (Pl3xmap), aesthetic plugins, or QoL mods that tend to lag behind on updates.

Today, the only workaround is to manually remove/comment the mod from MODRINTH_PROJECTS every time you upgrade, then re-add it once the author publishes a compatible build. This defeats the purpose of automatic version management.

Proposed solution

Allow marking individual entries in MODRINTH_PROJECTS as optional using a ? suffix on the project slug/ID:

MODRINTH_PROJECTS: |
  fabric-api
  lithium
  pl3xmap?
  bluemap?:beta

Behavior:

  1. Download phase: if an optional mod has no compatible version for the current Minecraft release, log a warning and continue startup instead of failing.
  2. Version resolution (VERSION_FROM_MODRINTH_PROJECTS=true): only required (non-?) projects are considered when computing the target Minecraft version. Optional mods never block a version upgrade.

The ? marker works with all existing format combinations:

Format Example
Slug only pl3xmap?
With version pl3xmap?:Oa9ZDzZq
With release type pl3xmap?:beta
With loader prefix fabric:pl3xmap?
Full combination fabric:pl3xmap?:beta

Use case

environment:
  TYPE: FABRIC
  VERSION_FROM_MODRINTH_PROJECTS: true
  MODRINTH_PROJECTS: |
    fabric-api
    lithium
    pl3xmap?

When Minecraft 26.2 drops and fabric-api + lithium support it but pl3xmap doesn't yet:

  • The server upgrades to 26.2 automatically (pl3xmap doesn't hold it back)
  • The server starts without pl3xmap, logging a warning
  • Once pl3xmap publishes a 26.2 build, the next container restart picks it up automatically

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions