Skip to content

minecraft-modrinth: fix search/version filters hiding compatible mods and plugins - #166

Open
Martindob wants to merge 4 commits into
pelican:mainfrom
Martindob:fix/minecraft-modrinth-search-filtering
Open

Martindob wants to merge 4 commits into
pelican:mainfrom
Martindob:fix/minecraft-modrinth-search-filtering

Conversation

@Martindob

Copy link
Copy Markdown

Summary

Fixes several independent bugs that caused mods/plugins actually compatible with a server to be missing from search results and version listings. All confirmed against the live Modrinth API, not just in theory.

  1. Loader compatibility wasn't expanded to backwards-compatible loaders. Plugins that only declare spigot/bukkit (never re-tagged paper) were invisible on a Paper server. Added getCompatibleLoaders() to OR in upstream-compatible loaders (paper→spigot/bukkit, purpur→paper/spigot/bukkit, folia→paper/spigot/bukkit, waterfall→bungeecord, quilt→fabric). One-directional only.
  2. Proxy loaders were filtered by an exact Minecraft version, even though Velocity/BungeeCord/Waterfall aren't tied to one - their declared game versions mostly reflect when they were last published. The version filter is now skipped for these loaders.
  3. project_type was filtered by our own Mod/Plugin enum against Modrinth's raw field, which doesn't reflect actual compatibility - a Bukkit-family project can be stored as project_type: mod while only having paper/spigot/purpur versions (e.g. https://modrinth.com/plugin/excellenteconomy). The facet is now OR'd across mod and plugin.
  4. No explicit Minecraft version fell back to a single "latest release" tag, often ahead of what plugin authors have re-tagged. Now filters against the 5 most recent release tags instead of only the newest one. An explicit configured version is still an exact requirement.

Testing

  • php -l on all changed files.
  • Verified each search/version-list scenario directly against the live Modrinth API before and after each fix.

…lugins

getProjects()/getProjectVersions()/getProjectVersionsBulk() filtered
strictly by the single loader detected from the egg's tags (e.g.
"categories:paper" or "loaders":["paper"]). Plugins on Modrinth that
only declare the "spigot" or "bukkit" category (never re-tagged as
"paper" even though they work fine there, since Paper is backwards
compatible with the Spigot/Bukkit API) were silently excluded from
search results and from the available-versions list, even though they
are installable and run correctly.

Add getCompatibleLoaders() to expand the detected loader into its
upstream-compatible loaders (paper -> paper/spigot/bukkit, purpur ->
purpur/paper/spigot/bukkit, folia -> folia/paper/spigot/bukkit,
waterfall -> waterfall/bungeecord, quilt -> quilt/fabric) and OR them
together in both the search facets and the version-list loader filter.
The mapping is one-directional: a plugin published only for a fork
isn't guaranteed to run on the upstream loader, so the reverse isn't
added.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
For Velocity/BungeeCord/Waterfall, the plugin's declared Modrinth game
versions mostly just reflect whenever it was last published, not what
it actually supports: a proxy relays the protocol for whatever version
the backend servers run and isn't itself tied to one Minecraft version.
Filtering search results and version lists by an exact game version
match was hiding older but still working proxy plugins.

Skip the "versions" search facet and the game_versions query param for
these loaders; the loader/category filter (already OR'd across
compatible loaders) is what actually determines compatibility here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
…oject_type

Modrinth's "project_type" field is whatever the author picked when the
project was created, not what it's actually compatible with. A
Bukkit-family project can be stored as project_type "mod" while only
having paper/spigot/purpur versions, and Modrinth's own site still
lists it under /plugin/ since it decides that split by loader, not
this field (e.g. https://modrinth.com/plugin/excellenteconomy).
Filtering search strictly by our own Mod/Plugin enum value against
this field hid such projects entirely, even on an exact loader match.

The loader/category facet already discriminates mod-loader projects
(fabric/forge/...) from plugin-loader ones (paper/spigot/...), so
project_type is now OR'd across both values, kept only as a loose
safety net against unrelated types like resourcepacks/shaders/
datapacks rather than as the actual mod vs. plugin split.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
…l show

Verified against the live Modrinth API: the newest release tag right
now is 26.3, but excellenteconomy (and similarly many other plugins)
only declares support up to 26.1.2 - two releases behind, even though
it's a plain Bukkit-API economy plugin with no reason to actually break
on newer patches. Servers without an explicit MINECRAFT_VERSION/
MC_VERSION variable fell back to that single newest tag and filtered
search/version-list results by an exact match against it, hiding any
plugin whose author hasn't re-tagged support for it yet.

Add getRecentMinecraftVersions() (the last 5 release tags) and use
that as an OR'd window instead of the single newest tag whenever no
explicit version is configured. An explicit server version is still
treated as an exact requirement, since that's a real constraint rather
than a guess. Confirmed against the live API that excellenteconomy now
appears in search and has an installable version file with this window.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d2d5104c-c9a3-4ba4-a092-18d05dcd73d4

📥 Commits

Reviewing files that changed from the base of the PR and between 9610734 and 0f9285b.

📒 Files selected for processing (1)
  • minecraft-modrinth/src/Services/MinecraftModrinthService.php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants